Re: DocumentBuiltiInProperteries

From: Peter (peterguy)
Date: 11/22/04


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
>
>



Relevant Pages

  • Re: How to create a vbscript to open outlook 2003 (Newbie question)
    ... anything that showed me how to create a script that would just open outlook. ... | ' Open and Print a Word Document ... | when it opens Outlook: ...
    (microsoft.public.scripting.vbscript)
  • Re: Modifying a record field value while not blocking it to others
    ... And of course again the record you are trying to modify has not to be 'open' ... someone opens that ID=12 record everything in it is locked. ... often add a script line which opens a random record if the file holds enough ... system where customers use Credits when renting items and get Credits ...
    (comp.databases.filemaker)
  • Re: Right click on text vs. right click on hyperlink
    ... I were to do that the built-in Windows way, I have to go down about ... >> me to open in one step the editing page of any archive page in my ... >> contains the below Windows script. ... >> that url and opens the editing page. ...
    (microsoft.public.scripting.vbscript)
  • RE: Word document unreadable
    ... It seems that the issue is related to the font setting. ... Which font is set on the Word document? ... Microsoft Online Partner Support ... It opens but the ...
    (microsoft.public.office.misc)
  • This script shows the Hex dump of a file
    ... this script opens an IE windows and shows the hex dump of the file dropped on the icon. ... ' Scrive le intestazioni html. ...
    (microsoft.public.scripting.vbscript)