D
dtamajon
I'm working with VS.NET and Office 2003. Now I'm trying to convert some
HTML files to Word format.
Dim wApp As Word.Application
Dim wDoc As Word.Document
Dim missingValue As Object = System.Reflection.Missing.Value
wDoc = wApp.Documents.Open(htmlFile.html)
wDoc.SaveAs("wordFile.doc", Word.WdSaveFormat.wdFormatDocument)
wDoc.Close()
wApp.Quit(missingValue, missingValue, missingValue)
That code work fine for Office 2000, but not for 2003, because Word is
asking for losing style sheets on transformation (you can try doing the
same from the Word application). So, I need to avoid the message box.
I tried with "wApp.DisplayAlerts = WdAlertLevel.wdAlertsNone", with no
results.
Any idea?
Thanks,
Dani
HTML files to Word format.
Dim wApp As Word.Application
Dim wDoc As Word.Document
Dim missingValue As Object = System.Reflection.Missing.Value
wDoc = wApp.Documents.Open(htmlFile.html)
wDoc.SaveAs("wordFile.doc", Word.WdSaveFormat.wdFormatDocument)
wDoc.Close()
wApp.Quit(missingValue, missingValue, missingValue)
That code work fine for Office 2000, but not for 2003, because Word is
asking for losing style sheets on transformation (you can try doing the
same from the Word application). So, I need to avoid the message box.
I tried with "wApp.DisplayAlerts = WdAlertLevel.wdAlertsNone", with no
results.
Any idea?
Thanks,
Dani