PC Review


Reply
Thread Tools Rate Thread

Copying properties

 
 
il barbi
Guest
Posts: n/a
 
      23rd Oct 2009
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


 
Reply With Quote
 
 
 
 
Graham Mayor
Guest
Posts: n/a
 
      24th Oct 2009

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
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


il barbi wrote:
> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying properties from one mail to another John1170 Microsoft Outlook Discussion 1 10th Oct 2009 08:06 AM
copying MAPI properties =?Utf-8?B?Tmlrb2xhcw==?= Microsoft Outlook Form Programming 1 8th Nov 2006 03:16 PM
Copying properties to 'this' Adam W Root Microsoft C# .NET 2 14th Mar 2004 11:05 PM
Copying object properties Tony Vitonis Microsoft VB .NET 0 13th Nov 2003 12:36 AM
Copying object properties Tony Vitonis Microsoft VB .NET 1 10th Nov 2003 07:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:29 AM.