Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I am trying to compile a template document for new proposals and in some
downloaded templates I see the excellent use of Content Control fields. I want the user to be able to enter the customer name once at the beginning and for this data to be replicated in the header and other areas of the document and Content Control seems to be the answer. But I can't seem to make this work. Anyone know how to reference the information in a Content Control? The Properties dialog box seems to omit important info, like the field name for starters ... All very confusing!! |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
See http://gregmaxey.mvps.org/Repeating_Data.htm
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org piersonal wrote: I am trying to compile a template document for new proposals and in some downloaded templates I see the excellent use of Content Control fields. I want the user to be able to enter the customer name once at the beginning and for this data to be replicated in the header and other areas of the document and Content Control seems to be the answer. But I can't seem to make this work. Anyone know how to reference the information in a Content Control? The Properties dialog box seems to omit important info, like the field name for starters ... All very confusing!! |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Has Greg added material on Content Controls (new in Word 2007)?
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Graham Mayor" wrote in message ... See http://gregmaxey.mvps.org/Repeating_Data.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org piersonal wrote: I am trying to compile a template document for new proposals and in some downloaded templates I see the excellent use of Content Control fields. I want the user to be able to enter the customer name once at the beginning and for this data to be replicated in the header and other areas of the document and Content Control seems to be the answer. But I can't seem to make this work. Anyone know how to reference the information in a Content Control? The Properties dialog box seems to omit important info, like the field name for starters ... All very confusing!! |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
This article may help to shed some light:
http://blogs.msdn.com/microsoft_offi...yet-equal.aspx -- Dawn Crosier Microsoft MVP "Education Lasts a Lifetime" This message was posted to a newsgroup, Please post replies and questions to the group so that others can learn as well. "piersonal" wrote in message ... I am trying to compile a template document for new proposals and in some downloaded templates I see the excellent use of Content Control fields. I want the user to be able to enter the customer name once at the beginning and for this data to be replicated in the header and other areas of the document and Content Control seems to be the answer. But I can't seem to make this work. Anyone know how to reference the information in a Content Control? The Properties dialog box seems to omit important info, like the field name for starters ... All very confusing!! |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Many thanks for this Graham but like Suzanne says, this doesn't actually
answer the question. Forms and bookmarks and the like are all great, but Content Control which is new in v2007 seems to be exactly what I was looking for but is not very well documented / seems frustratingly limited. Is anyone out there able to help explain this feature?? |
#6
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Suzanne,
No I haven't. I looked into doing that a few months ago but quit when I found bum dope in the MSDN technical article on Content Controls. When first created CCs apparently could have a unique name (or tag). I suppose through changes in development the name and tag are no longer unique to the CC. I was hoping this would be corrected (the article and the issue) before the public release. It wasn't. I am not at my Word2007 machine right now, but if memory serves the CC has a unique ID number that you can determine through VBA and then use it is a reference. I will check tonight and perhaps post some updated information on my web page. On Mar 28, 11:01 am, "Suzanne S. Barnhill" wrote: Has Greg added material on Content Controls (new in Word 2007)? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Graham Mayor" wrote in message ... Seehttp://gregmaxey.mvps.org/Repeating_Data.htm -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org piersonal wrote: I am trying to compile a template document for new proposals and in some downloaded templates I see the excellent use of Content Control fields. I want the user to be able to enter the customer name once at the beginning and for this data to be replicated in the header and other areas of the document and Content Control seems to be the answer. But I can't seem to make this work. Anyone know how to reference the information in a Content Control? The Properties dialog box seems to omit important info, like the field name for starters ... All very confusing!!- Hide quoted text - - Show quoted text - |
#7
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
The sites make really good reading thank you. The one main question that I
had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#8
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Yes, you can create custom properties. I was shown, but have not had a
chance to work up the steps. Perhaps Graham will get some time this evening. If he doesn't then I will see what I can come up with. XML is NOT my strong suit by any stretch of the means. sigh -- Dawn Crosier Microsoft MVP "Education Lasts a Lifetime" This message was posted to a newsgroup, Please post replies and questions to the group so that others can learn as well. "piersonal" wrote in message ... The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#9
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Here is one way and I am working on others to update my website:
Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#10
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Greg and I have the same initials, we have been friends for years, we both
have Word related web sites and both bounce ideas off one another - but we are not the same person ![]() -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Dawn Crosier, Word MVP wrote: Yes, you can create custom properties. I was shown, but have not had a chance to work up the steps. Perhaps Graham will get some time this evening. If he doesn't then I will see what I can come up with. XML is NOT my strong suit by any stretch of the means. sigh |
#11
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Is there a way to incorporate the auto-updated content controls without
resorting to VBA or other coding? The templates freely downloaded from Office Online seem to have these already incorporated, dependent on standard document properties. It would be nice if I could create these myself, too. -- Thanks, Pamela Denchfield "Greg Maxey" wrote: Here is one way and I am working on others to update my website: Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#12
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi again Greg, just read your webpage
http://gregmaxey.mvps.org/Repeating_Data.htm - the following excerpt implies that I am indeed limited to the built-in (factory default) Document Property content controls if I want to "repeat data" without coding. Am I right? "A very simple method of repeating data in a Word2007 document without knowledge of any XML or VBA is to use the built-in Document Property content controls. " -- Thanks, Pamela Denchfield "Pamela Denchfield" wrote: Is there a way to incorporate the auto-updated content controls without resorting to VBA or other coding? The templates freely downloaded from Office Online seem to have these already incorporated, dependent on standard document properties. It would be nice if I could create these myself, too. -- Thanks, Pamela Denchfield "Greg Maxey" wrote: Here is one way and I am working on others to update my website: Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#13
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Pamela,
I still don't claim to be an expert with Content Controls or even a Pioneer. Let's say a stumbling Pioneer ;-) You can always bookmark a ContentControl range and use a REF field to that bookmark. Other than that AFAIK, it is the built-ins with the limit they carry or some VBA coding. The piece stating with 7.c. is really the way to go and the coding is relatively simple. -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Pamela Denchfield wrote: Hi again Greg, just read your webpage http://gregmaxey.mvps.org/Repeating_Data.htm - the following excerpt implies that I am indeed limited to the built-in (factory default) Document Property content controls if I want to "repeat data" without coding. Am I right? "A very simple method of repeating data in a Word2007 document without knowledge of any XML or VBA is to use the built-in Document Property content controls. " Is there a way to incorporate the auto-updated content controls without resorting to VBA or other coding? The templates freely downloaded from Office Online seem to have these already incorporated, dependent on standard document properties. It would be nice if I could create these myself, too. -- Thanks, Pamela Denchfield "Greg Maxey" wrote: Here is one way and I am working on others to update my website: Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this. |
#14
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
On Dec 18, 4:56 pm, Pamela Denchfield wrote:
Is there a way to incorporate the auto-updated content controls without resorting to VBA or other coding? The templates freely downloaded from Office Online seem to have these already incorporated, dependent on standard document properties. It would be nice if I could create these myself, too. -- Thanks, Pamela Denchfield "Greg Maxey" wrote: Here is one way and I am working on others to update my website: Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this.- Hide quoted text - - Show quoted text - Pamela, I experimented today with creating and AddIn that would allow a user to insert multiple custom mapped CCs seemingly effortless and without needing to do any VBA or XML coding. I want to refine it a bit before I post it to my website but if you contact me through the website feedback I will share it with you now. |
#15
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I appreciate the add-in and look forward to trying it out on my next template
project! -- Thanks, Pamela Denchfield "Greg Maxey" wrote: On Dec 18, 4:56 pm, Pamela Denchfield wrote: Is there a way to incorporate the auto-updated content controls without resorting to VBA or other coding? The templates freely downloaded from Office Online seem to have these already incorporated, dependent on standard document properties. It would be nice if I could create these myself, too. -- Thanks, Pamela Denchfield "Greg Maxey" wrote: Here is one way and I am working on others to update my website: Use the Document_ContentConrolOnExit event to write the text value of the current Content Control to a custom document property. Then use DocProperty fields at the other location in your document to repeat the data: Private Sub Document_ContentControlOnExit(ByVal currentCC As ContentControl, Cancel As Boolean) Dim oDoc As Word.Document Set oDoc = ActiveDocument Select Case currentCC.Title Case "Client_Name" On Error Resume Next oDoc.CustomDocumentProperties("Client_Name").Value = currentCC.Range.Text If Err.Number = 5 Then oDoc.CustomDocumentProperties.Add _ Name:="Client_Name", LinkToContent:=False, Value:=currentCC.Range.Text, _ Type:=msoPropertyTypeString End If On Error GoTo 0 Case Else 'Do nothing End Select UpdateDocumentFields End Sub Sub UpdateDocumentFields() Dim pRange As Word.Range Dim iLink As Long iLink = ActiveDocument.Sections(1).Headers(1).Range.StoryT ype For Each pRange In ActiveDocument.StoryRanges Do pRange.Fields.Update Set pRange = pRange.NextStoryRange Loop Until pRange Is Nothing Next End Sub -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. piersonal wrote: The sites make really good reading thank you. The one main question that I had was with how to reference a Content Control. A template that I downloaded had a Content Control for the Title, which was repeated on the next page. Update one and the other would update. This is good for existing Property fields, but can we create custom ones? I want to have users enter the customer name on the front page (into a Content Control) and to have this information repeated in other areas, but I cannot for the life of me figure out how to do this.- Hide quoted text - - Show quoted text - Pamela, I experimented today with creating and AddIn that would allow a user to insert multiple custom mapped CCs seemingly effortless and without needing to do any VBA or XML coding. I want to refine it a bit before I post it to my website but if you contact me through the website feedback I will share it with you now. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Content Control Titles Vanishing | Microsoft Word Help | |||
What is a Tag in the Content Control Properties dialog box? | Microsoft Word Help | |||
form content disappears with select-all/update fields | Microsoft Word Help | |||
Control key shortcuts do not work | Microsoft Word Help | |||
How do I make the Table of Content link work? | Microsoft Word Help |