A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do content control fields work?



 
 
Thread Tools Display Modes
  #1  
Old March 28th, 2007, 02:56 PM posted to microsoft.public.word.docmanagement
piersonal
external usenet poster
 
Posts: 14
Default How do content control fields work?

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  
Old March 28th, 2007, 03:42 PM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 18,297
Default How do content control fields work?

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  
Old March 28th, 2007, 04:01 PM posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default How do content control fields work?

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  
Old March 28th, 2007, 04:27 PM posted to microsoft.public.word.docmanagement
Dawn Crosier, Word MVP
external usenet poster
 
Posts: 476
Default How do content control fields work?

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  
Old March 28th, 2007, 04:30 PM posted to microsoft.public.word.docmanagement
piersonal
external usenet poster
 
Posts: 14
Default How do content control fields work?

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  
Old March 28th, 2007, 04:30 PM posted to microsoft.public.word.docmanagement
Greg Maxey
external usenet poster
 
Posts: 259
Default How do content control fields work?

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  
Old March 28th, 2007, 05:56 PM posted to microsoft.public.word.docmanagement
piersonal
external usenet poster
 
Posts: 14
Default How do content control fields work?

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  
Old March 28th, 2007, 08:38 PM posted to microsoft.public.word.docmanagement
Dawn Crosier, Word MVP
external usenet poster
 
Posts: 476
Default How do content control fields work?

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  
Old March 28th, 2007, 11:40 PM posted to microsoft.public.word.docmanagement
Greg Maxey
external usenet poster
 
Posts: 290
Default How do content control fields work?

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  
Old March 29th, 2007, 06:40 AM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 18,297
Default How do content control fields work?

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



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.