I have a problem, maybe someone can help me.
From Excel, through VBA I want open a Word document (docx) and convert and save to HTML.
I tried a method but has given a disappointing result. I attach.
I recorded a macro in Word and I pasted in Excel.
A better idea?Public objWord As Object Sub deschidWord() Dim texta(10) As String Dim ws As Worksheet Set objWord = CreateObject("Word.Application") objWord.Visible = True loca = d.Cells(1, 1) ' my word file name objWord.Documents.Open loca objWord.ActiveDocument.SaveAs2 Filename:="D:\proba.htm", FileFormat:= _ wdFormatFilteredHTML, LockComments:=False, Password:="", AddToRecentFiles _ :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _ :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ SaveAsAOCELetter:=False, CompatibilityMode:=0 End Sub Sub inchidWord() objWord.ActiveDocument.Close objWord.Quit End Sub



Reply With Quote
