Doc property into another document

L

LarryLL

I know this is the programming group, but I hope one of you generous people
will know this.

I have 2 documents, A and B. I am interested in putting a doc property of
Doc
A into Doc B.

I think a field reference would be good, but I have only found references
for bookmarks, not doc properties.

Any recommendations?

Thanks
 
J

Jezebel

Assuming, you have references to both documents ---

Dim pProp as Word.DocumentProperty

set pProp = DocA.CustomDocumentProperties("MyProp")
DocB.CustomDocumentProperties.Add Name:="MyProp", LinkToContent:=False,
Type:=pProp.Type, Value:=pProp.Value


However, given the wording of your question, I suspect you didn't have in
mind a VBA solution. What are you actually trying to do?
 
L

LarryLL

Thanks for your response.

Document B is an list of Documents, with information about each, including
the currently submitted revision. (This revision is in the Doc property)

I am interested in having the Document list automatically contain the
current revision for each document, without having to manually update it.

Field references work well within an active document, I am hoping I can find
a way to use a similar method between documents.
 
J

Jezebel

Select and copy the value in document A. Switch to document B. Paste Special
(text, formatted or unformatted) with the 'Paste Link' checkbox ticked.
 
L

LarryLL

Thank you very much; That was a lot easier that what I was trying.

Have a good weekend.
 

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