Re: DocumentBuiltiInProperteries
From: Peter (peterguy)
Date: 11/22/04
- Next message: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Previous message: Lars F. Jørgensen: "Open Hyperlink in new window fra Excel"
- Next in thread: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Reply: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Nov 2004 14:02:14 -0800
Try this:
Dim prop As DocumentProperty
Set prop = ActiveDocument.BuiltInDocumentProperties("Author")
prop.Value = "Me"
The above worked for me in O2k2.
You can also cut out the dim and set statements and simply do:
ActiveDocument.BuiltInDocumentProperties("Author").Value = "Me"
hth,
-Peter
"Hollis D. Paul" <Hollis@outhousebythesound.com> wrote in message news:VA.00001ca7.012e2c95@obts-outlookdev.outlookbythesound.mukwoods...
> I have created a script that opens an Outlook message, opens a Word
> Document, copies the message HTMLbody property into the document, then
> saves the document as a XML file. I have taken the subject property of
> the message, massaged it a little, and want to set the document's Title
> and Topic (perhaps Subject) properties in the documents BuiltIn
> Properties collection. Well, at least, I think that's what I am trying
> to do. I want to see the string I have created in those fields when I
> open the document and click properties.
>
> When I open a word document, go to VBA, and use F2 to get the object
> browser, the DocumentBuiltInProperties appears as a read only object.
> I was told that some of the DocumentBuiltInProperties members were
> settable. However, executing the code always kills the operation of
> the script.
>
> So, does anyone know of some other object or method that will allow me
> to set those fields that I see when I open the document and then click
> File-->Properties?
>
> I figure that if I can do it from the UI, there has to be a way to do
> it programmatically, and I have about 150 messages to run this script
> on.
>
> Hollis D. Paul [MVP - Outlook]
> Hollis@outhousebythesound.com
>
> Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600
> http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US
>
> Mukilteo, WA USA
>
>
- Next message: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Previous message: Lars F. Jørgensen: "Open Hyperlink in new window fra Excel"
- Next in thread: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Reply: Hollis D. Paul: "Re: DocumentBuiltiInProperteries"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|