How to print out custom properties only?

G

GG

I want to print out all the fields in custom properties as a page. Is there a
way?
Thanks, GG
 
G

Graham Mayor

You can do so with a macro

Sub PrintCustomProperties()
Dim oProperty As DocumentProperty
Dim oDoc As Document
Dim PropDoc As Document
Dim oRng As Range
Set oDoc = ActiveDocument
Set PropDoc = Documents.Add
PropDoc.Range.ParagraphFormat.TabStops.Add InchesToPoints(2)
For Each oProperty In oDoc.CustomDocumentProperties
Set oRng = PropDoc.Range
oRng.Collapse wdCollapseEnd
oRng.Text = oProperty.Name & vbTab & oProperty.Value & vbCr
Next oProperty
PropDoc.PrintOut
PropDoc.Close
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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