S
Steve Bugden
Hi,
I have written some code to open create a word object and save a word
document as html.
THis works fine, except that the document flashes up on the screen briefly.
I have set the visible propery to false, is there something else I need to do?
The code below is late bound, but I get the same effect with early binding.
Any suggestions very gratefully received.
Steve.
Dim strWordFileName as string = "myfilename.doc"
Dim strHTMLFileName as string ="myfilename.htm"
Dim MSWord As Object
MSWord = CreateObject("Word.Application")
MSWord.Visible = False
MSWord.Documents.Open(FileName:=strWordFileName, ReadOnly:=True)
MSWord.ActiveDocument.SaveAs(FileName:=strHTMLFileName, FileFormat:=10)
MSWord.Documents.Close()
MSWord.Quit()
MSWord = Nothing
I have written some code to open create a word object and save a word
document as html.
THis works fine, except that the document flashes up on the screen briefly.
I have set the visible propery to false, is there something else I need to do?
The code below is late bound, but I get the same effect with early binding.
Any suggestions very gratefully received.
Steve.
Dim strWordFileName as string = "myfilename.doc"
Dim strHTMLFileName as string ="myfilename.htm"
Dim MSWord As Object
MSWord = CreateObject("Word.Application")
MSWord.Visible = False
MSWord.Documents.Open(FileName:=strWordFileName, ReadOnly:=True)
MSWord.ActiveDocument.SaveAs(FileName:=strHTMLFileName, FileFormat:=10)
MSWord.Documents.Close()
MSWord.Quit()
MSWord = Nothing