Copying properties

I

il barbi

I'd like to copy all 9 properties in window "Properties" from a file to
another in the fastest way, is it possible in one shoot?
il barbi
 
G

Graham Mayor

If you mean the 9 items on the Summary tab of the document properties, then
you could use a macro as follows. This copies the 9 properties from an open
document to a new document based on the normal template. If you want to copy
them to a particular document then you would have to change the line Set
TargetDoc = to open the specific document.
http://www.gmayor.com/installing_macro.htm

Dim SourceDoc As Document
Dim TargetDoc As Document
Dim sTitle As String
Dim sSubject As String
Dim sAuthor As String
Dim sManager As String
Dim sCompany As String
Dim sCategory As String
Dim sKeywords As String
Dim sComments As String
Dim sHlink As String
Set SourceDoc = ActiveDocument
Set TargetDoc = Documents.Add
With SourceDoc
sTitle = .BuiltInDocumentProperties(wdPropertyTitle)
sSubject = .BuiltInDocumentProperties(wdPropertySubject)
sAuthor = .BuiltInDocumentProperties(wdPropertyAuthor)
sManager = .BuiltInDocumentProperties(wdPropertyManager)
sCompany = .BuiltInDocumentProperties(wdPropertyCompany)
sCategory = .BuiltInDocumentProperties(wdPropertyCategory)
sKeywords = .BuiltInDocumentProperties(wdPropertyKeywords)
sComments = .BuiltInDocumentProperties(wdPropertyComments)
sHlink = .BuiltInDocumentProperties(wdPropertyHyperlinkBase)
End With
With TargetDoc
.BuiltInDocumentProperties(wdPropertyTitle) = sTitle
.BuiltInDocumentProperties(wdPropertySubject) = sSubject
.BuiltInDocumentProperties(wdPropertyAuthor) = sAuthor
.BuiltInDocumentProperties(wdPropertyManager) = sManager
.BuiltInDocumentProperties(wdPropertyCompany) = sCompany
.BuiltInDocumentProperties(wdPropertyCategory) = sCategory
.BuiltInDocumentProperties(wdPropertyKeywords) = sKeywords
.BuiltInDocumentProperties(wdPropertyComments) = sComments
.BuiltInDocumentProperties(wdPropertyHyperlinkBase) = sHlink
End With


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

My web site www.gmayor.com

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

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