Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Repeating Data - Word 2007
I'm creating a template, and would like the title and document # to
automatically repeat in the document after they've been entered on the cover page. I have done this successfully using the method described at http://gregmaxey.mvps.org/Repeating_Data.htm (section 7, by mapping these two fields to built-in Document Property content controls). It works well. However, I'm wondering if there's a way to see what properties the two fields are mapped to? I do remember for this document, but if I'm using the same technique for other templates, it would be helpful to be able to see which of the document's built-in properties I'm mapped to. Anyone know if this is possible? (I'm really hoping that in Word 2010 they will make it easier to re-use data entered into content controls. It's such a potentially useful feature, and it's a shame that it can only really be accessed in 2007 by mapping to a limited number of document properties, or by using complicated code. /rant) |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Repeating Data - Word 2007
JenC, Yes. Well yes in a rather indirect way. If you entered each of the 15 builtin properties in a text document and fille them in like "This is the Author" "This is a commnet" etc. and then ran this code: Sub ShowCustomXMLPartsText() With ActiveDocument.Range .InsertAfter "CustomXML Part 1 XML: " & ActiveDocument.CustomXMLParts (1).XML & vbCr & vbCr .InsertAfter "CustomXML Part 2 XML: " & ActiveDocument.CustomXMLParts (2).XML & vbCr & vbCr .InsertAfter "CustomXML Part 2 XML: " & ActiveDocument.CustomXMLParts (3).XML End With End Sub You would get a printout something like this. This will tell you that the "Author" built in property maps to the "creator" node in the coreProperties CustomXML Part. CustomXML Part 1 XML: cp:coreProperties xmlns:dc="http://purl.org/dc/ elements/1.1/" xmlns:cp="http://schemas.openxmlformats.org/package/ 2006/metadata/core-properties"dc:creatorThis is the author/ dc:creatorcp:keywordsThis is the keyword/ cp:keywordsdc:descriptionThis is the comment/ dc:descriptiondc:subjectThis is the subject/ dc:subjectdc:titleThis is the title/dc:titlecp:categoryThis is the category/cp:categorycp:contentStatusThis is the status/ cp:contentStatus/cp:coreProperties CustomXML Part 2 XML: Properties xmlns="http:// schemas.openxmlformats.org/officeDocument/2006/extended- properties"CompanyThis is the company/CompanyManagerThis is the manager/Manager/Properties CustomXML Part 2 XML: CoverPageProperties xmlns="http:// schemas.microsoft.com/office/2006/coverPageProps"PublishDateThis is the publish date/PublishDateAbstractThis is the abstract/ AbstractCompanyAddressThis is the Co. address/ CompanyAddressCompanyPhoneThis is the Co. Phone/ CompanyPhoneCompanyFaxThis is the Co. Fax/ CompanyFaxCompanyEmailThis is the Co. E-mail/CompanyEmail/ CoverPageProperties Now if you select any of the controls and run this: Sub Querry() MsgBox Selection.ContentControls(1).XMLMapping.CustomXMLN ode.BaseName End Sub It will tell which node the control is mapped to. Let's leave the ranting to dear Peter. He does it so well. The complicated code for mapping CCs has already been worke out for you. See: http://gregmaxey.mvps.org/Mapped_Content_Control.htm On Oct 21, 6:09*pm, JenC wrote: I'm creating a template, and would like the title and document # to automatically repeat in the document after they've been entered on the cover page. I have done this successfully using the method described athttp://gregmaxey.mvps.org/Repeating_Data.htm(section 7, by mapping these two fields to built-in Document Property content controls). It works well. However, I'm wondering if there's a way to see what properties the two fields are mapped to? I do remember for this document, but if I'm using the same technique for other templates, it would be helpful to be able to see which of the document's built-in properties I'm mapped to. Anyone know if this is possible? (I'm really hoping that in Word 2010 they will make it easier to re-use data entered into content controls. It's such a potentially useful feature, and it's a shame that it can only really be accessed in 2007 by mapping to a limited number of document properties, or by using complicated code. /rant) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
repeating data | New Users | |||
Basics of Repeating data | Mailmerge | |||
Repeating Data | New Users | |||
Formatting repeating data | Microsoft Word Help | |||
Repeating data across Forms | Microsoft Word Help |