How to access document summary?

£

£ukasz

Hi,

When I click File | Properties I can fill the document's summary. How
can I do this in code?

Thanks in advance
£ukasz
 
K

Kevin B

Here is some code that will set 2 properties:

Dim doc As Document

Set doc = ActiveDocument

With doc
.BuiltInDocumentProperties(wdPropertyTitle) = "TitleText goes here."
.BuiltInDocumentProperties(wdPropertyAuthor) = "Author name goes
here."
End With

The following built-in properties can be set programmatically: title,
subject, keywords, comments, template, last print date, category, format,
manager, company, number of slides, number of multimedial clips, and
hyperlink base. All of these are wd constants.
 
K

Kevin B

Here's a list of all the wd property constants:

wdPropertyAppName
wdPropertyAuther
wdPropertyBytes
wdPropertyCategory
wdPropertyCharacters
wdPropertyCharsWSpaces
wdPropertyComments
wdPropertyCompany
wdPropertyFormat
wdPropertyHiddenSlides
wdPropertyHyperlinkBase
wdPropertyKeywords
wdPropertyLastAuthor
wdPropertyLines
wdPropertyManager
wdPropertyMMClips
wdPropertyNotes
wdPropertyPages
wdPropertyParas
wdPropertyPropertyRevision
wdPropertySecurity
wdPropertySlides
wdPropertySubject
wdPropertyTemplate
wdPropertyTimeCreated
wdPropertyTimeLastPrinted
wdPropertyTimeLastSaved
wdPropertyPropertyTitle
wdPropertyVBATotalEdit
wdPropertyWords

I had do rummage about to find the document I had parked them in.

Hope this helps...
 
£

£ukasz

Kevin said:
Here's a list of all the wd property constants:

wdPropertyAppName
wdPropertyAuther
wdPropertyBytes
wdPropertyCategory
wdPropertyCharacters
wdPropertyCharsWSpaces
wdPropertyComments
wdPropertyCompany
wdPropertyFormat
wdPropertyHiddenSlides
wdPropertyHyperlinkBase
wdPropertyKeywords
wdPropertyLastAuthor
wdPropertyLines
wdPropertyManager
wdPropertyMMClips
wdPropertyNotes
wdPropertyPages
wdPropertyParas
wdPropertyPropertyRevision
wdPropertySecurity
wdPropertySlides
wdPropertySubject
wdPropertyTemplate
wdPropertyTimeCreated
wdPropertyTimeLastPrinted
wdPropertyTimeLastSaved
wdPropertyPropertyTitle
wdPropertyVBATotalEdit
wdPropertyWords

I had do rummage about to find the document I had parked them in.

Hope this helps...

It helped very much, thanks a lot.
£ukasz
 
J

Jants

Hi, when I use the following code:
x = Application.Dialogs(750).Show
If x = "-1" Then
MsgBox "Cancel"
Else: MsgBox "OK"
End If

I get an error when I hit Cancel. How can I fix this ? I just want to close
the damned dialogbox when I hit Cancel :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top