H
Hollis_mvp
I have an Outlook form that picks a message from an Outlook folder, stuffs
the message's .body property into a new Word document, constructs a file name
from the message header, and then constructs a path\name.mht string that I
use as an argument in the save as command. wdFormatWebArchive is the format
that is specified for saving files in the .mht format. It evaluates to 9 for
use in VBScript. 8 and 10 are the other two html formats.
When I use the command as follows:
MyDoc.SaveAs strSaveName, 9
The save dialog pops up. If I use 8 or 10, with .mht as the type in
strSaveName, it saves automatically, but SharePoint then will not load it as
a .mht file, which is what I am ultimately trying to achieve.
If I add the follosing command before the SaveAs command,
appWord.DefaultWebOptions.SaveNewWebPagesAsWebArchives
MyDoc.SaveAs strSaveName, 9
it still pops up the SaveAs dialog box, and my script doesn't complete
properly.
How do I get Word to automatically save the file in .mht format and allow my
script to complete properly.
Thank you.
the message's .body property into a new Word document, constructs a file name
from the message header, and then constructs a path\name.mht string that I
use as an argument in the save as command. wdFormatWebArchive is the format
that is specified for saving files in the .mht format. It evaluates to 9 for
use in VBScript. 8 and 10 are the other two html formats.
When I use the command as follows:
MyDoc.SaveAs strSaveName, 9
The save dialog pops up. If I use 8 or 10, with .mht as the type in
strSaveName, it saves automatically, but SharePoint then will not load it as
a .mht file, which is what I am ultimately trying to achieve.
If I add the follosing command before the SaveAs command,
appWord.DefaultWebOptions.SaveNewWebPagesAsWebArchives
MyDoc.SaveAs strSaveName, 9
it still pops up the SaveAs dialog box, and my script doesn't complete
properly.
How do I get Word to automatically save the file in .mht format and allow my
script to complete properly.
Thank you.