In article
<VA.00001c80.03117845@obts-outlookdev.outlookbythesound.mukwoods>, Hollis
D. Paul wrote:
> Will someone please give me a hint about how to get the Outlook
> property into the document?
Turns out to be absurdly simple:
appWord.Documents.Add strWordTemplate
appWord.Visible = True
Set MyDoc = appWord.ActiveDocument
MyDoc.Content.InsertAfter o_item.HTMLBody
Boom! It's there.
> I also need help saving the document. If I set the strSaveName to
> Name.XML, it saves it with an XML extension, but it has the usual Word
> objects inside and it blows up when you try to open it. I need to get
> it to convert to XML before I save it, I guess. Any help on this?
Still got this problem to do. SaveAs doesn't seem to take any arguments,
and I don't find a list of converters that handls XML. What to do?
Hollis D. Paul [MVP - Outlook]
Hollis@outlookbythesound.com
Using Virtual Access, Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA
Jean-Guy Marcil - 17 Nov 2004 22:09 GMT
Hollis D. Paul was telling us:
Hollis D. Paul nous racontait que :
>> I also need help saving the document. If I set the strSaveName to
>> Name.XML, it saves it with an XML extension, but it has the usual
[quoted text clipped - 5 lines]
> arguments, and I don't find a list of converters that handls XML.
> What to do?
"SaveAs" no arguments? Where did you look?
From the Word VBA help file:
expression.SaveAs(FileName, FileFormat, LockComments, Password,
AddToRecentFiles, WritePassword, ReadOnlyRecommended, EmbedTrueTypeFonts,
SaveNativePictureFormat, SaveFormsData, SaveAsAOCELetter, Encoding,
InsertLineBreaks, AllowSubstitutions, LineEnding, AddBiDiMarks)
???
Or are you referring to something else?
What Word version? the XML filter is a very recent addition.
2003 or maybe 2002, I can't remeber which!
In 2003 you can certainly do:
ActiveDocument.SaveAs "MyFile", wdFormatXML

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Hollis D. Paul - 18 Nov 2004 00:51 GMT
> "SaveAs" no arguments? Where did you look?
Yes, I certainly mis-spoke on that one. A quick look through the list
didn't show anything relating to XML. I went back and found I had to
look through the members of wdSaveFormat. I thought that was the magic
bullet, but it still didn't work. It finally dawned that I could not
use the Intellisense defs and had to look up the numeric value of
wdFormatHtml. It is 8. All works now.
Thanks for the response.
Hollis D. Paul [MVP - Outlook]
Hollis@outlookbythesound.com
Using Virtual Access, Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA
In article
<VA.00001c80.03117845@obts-outlookdev.outlookbythesound.mukwoods>,
> I need to get
> it to convert to XML before I save it, I guess. Any help on this?
The real problem is that thee is no Intellisense in VBScript. So the
line that works is:
MyDoc.SaveAs strSaveName, 8
Hollis D. Paul [MVP - Outlook]
Hollis@outlookbythesound.com
Using Virtual Access, Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
Mukilteo, WA USA