P
Phil Galey
I'm using the Word 9 object in VB.NET. I have a 2-page document, where the
second page is also a separate section, which contains an image.
I need to save only the first page to an HTML file. I'm trying to do this
by deleting the second section using the following code:
wd.GoTo(Word.WdGoToItem.wdGoToSection, 2)
wd.Content.Delete(Word.WdUnits.wdSection, 1)
wd.SaveAs("<Path for HTM file>", Word.WdSaveFormat.wdFormatHTML)
however, the second line results in a Bad Parameter error. What am I doing
wrong? How can I save only the first page to an HTML file? Thanks.
second page is also a separate section, which contains an image.
I need to save only the first page to an HTML file. I'm trying to do this
by deleting the second section using the following code:
wd.GoTo(Word.WdGoToItem.wdGoToSection, 2)
wd.Content.Delete(Word.WdUnits.wdSection, 1)
wd.SaveAs("<Path for HTM file>", Word.WdSaveFormat.wdFormatHTML)
however, the second line results in a Bad Parameter error. What am I doing
wrong? How can I save only the first page to an HTML file? Thanks.