Can someone please point me in the correct direction. I am using Word 2003
and have the following code to set the Title property:
WordObject.ActiveDocument.SaveAs Filename:=rs.Fields(1) & "-" &
rs.Fields(2) & ".doc"
WordObject.ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) =
"Converted Activity"
WordObject.ActiveDocument.BuiltInDocumentProperties(wdPropertyAuthor) =
"Data Conversion"
WordObject.ActiveDocument.Save
WordObject.ActiveDocument.Close
When I review the results, the Author is correct but the Title is the first
sentance from the document.
Any suggestions will be greatly appreciated.
Rob
Helmut Weber - 11 Jul 2005 16:54 GMT
Hi Rob,
at a long shot:
WordObject.ActiveDocument.Saved = false
before
WordObject.ActiveDocument.Save
Greetings from Bavaria, Germany
Helmut Weber, MVP, WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Rob Diamant - 11 Jul 2005 19:19 GMT
Thanks, but it did not work. Any other suggestions?
Rob
> Hi Rob,
>
[quoted text clipped - 10 lines]
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
Jonathan West - 12 Jul 2005 16:11 GMT
Hi Rob
Change the order in which you do things, as follows
WordObject.ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) =
"Converted Activity"
WordObject.ActiveDocument.BuiltInDocumentProperties(wdPropertyAuthor) =
"Data Conversion"
WordObject.ActiveDocument.SaveAs Filename:=rs.Fields(1) & "-" &
rs.Fields(2) & ".doc"
WordObject.ActiveDocument.Close

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Can someone please point me in the correct direction. I am using Word 2003
> and have the following code to set the Title property:
[quoted text clipped - 14 lines]
>
> Rob