Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
I want to create a template/document that has
Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
Possibly the easiest method (instead of a bookmark) would be to apply a
character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
I tried your suggestion on using the style ref method.
It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
Assuming that you've applied a style which isn't used for anything
else to text in the main body of the document (say on the title page), the STYLEREF field should correctly reference the text even if the field is in the main header. -- Stefan Blom Microsoft Word MVP "Dave" wrote in message ... I tried your suggestion on using the style ref method. It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
I agree with Stefan. This should be working provided you've used the default
(backward-looking) StyleRef field. I suspect that what has happened is that you have inserted a page break after your title paragraph (the one you're referencing) and then pressed Enter again to get a "blank line" at the top of the next page. This creates an empty paragraph in the Title style, and that's what your StyleRef field is picking up. Instead of using an empty paragraph, add some Space Before to the first paragraph on the page; because it follows a page break, it will be retained. If this analysis is way off the mark, perhaps you'd like to send me a sample document to look at. -- 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. "Dave" wrote in message ... I tried your suggestion on using the style ref method. It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
I went into the header/footer and toggled the field code and then right
clicked and went to "Edit Field...". Upon looking at the "Field properties" list box, I noticed that there is a "Project Name" and "Project Name Char" style listed. If I changed my field code to be {STYLEREF "Project Name Char" } then it works just fine. After playing around a bit, I can get the "xxx Char" to show up if I select the text and in the "Styles and Formatting" toolbar select the style and right click and select "Update to match selection". Now, if I delete the original style, the one with "Char" tacked on the end is left hanging around. I guess I have my answer, so thanks for your help. If you have any thoughts on my confusion about the "Char" above, I am always will willing to learn. Cheers, Dave "Suzanne S. Barnhill" wrote: I agree with Stefan. This should be working provided you've used the default (backward-looking) StyleRef field. I suspect that what has happened is that you have inserted a page break after your title paragraph (the one you're referencing) and then pressed Enter again to get a "blank line" at the top of the next page. This creates an empty paragraph in the Title style, and that's what your StyleRef field is picking up. Instead of using an empty paragraph, add some Space Before to the first paragraph on the page; because it follows a page break, it will be retained. If this analysis is way off the mark, perhaps you'd like to send me a sample document to look at. -- 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. "Dave" wrote in message ... I tried your suggestion on using the style ref method. It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
This isn't a real style, I think. It is something Word uses to tag your use
of direct formatting so that you can use some of the style-handling tools on it. I think you are better off actually creating a custom character style. Suzanne has written an excellent tutorial on this. http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "Dave" wrote in message ... I went into the header/footer and toggled the field code and then right clicked and went to "Edit Field...". Upon looking at the "Field properties" list box, I noticed that there is a "Project Name" and "Project Name Char" style listed. If I changed my field code to be {STYLEREF "Project Name Char" } then it works just fine. After playing around a bit, I can get the "xxx Char" to show up if I select the text and in the "Styles and Formatting" toolbar select the style and right click and select "Update to match selection". Now, if I delete the original style, the one with "Char" tacked on the end is left hanging around. I guess I have my answer, so thanks for your help. If you have any thoughts on my confusion about the "Char" above, I am always will willing to learn. Cheers, Dave "Suzanne S. Barnhill" wrote: I agree with Stefan. This should be working provided you've used the default (backward-looking) StyleRef field. I suspect that what has happened is that you have inserted a page break after your title paragraph (the one you're referencing) and then pressed Enter again to get a "blank line" at the top of the next page. This creates an empty paragraph in the Title style, and that's what your StyleRef field is picking up. Instead of using an empty paragraph, add some Space Before to the first paragraph on the page; because it follows a page break, it will be retained. If this analysis is way off the mark, perhaps you'd like to send me a sample document to look at. -- 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. "Dave" wrote in message ... I tried your suggestion on using the style ref method. It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Field Code: User entered data updates in header/footer
Char or "linked" styles are an abomination; for information on eliminating
them, see http://homepage.swissonline.ch/cindy...p.htm#CharStyl -- 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. "Dave" wrote in message ... I went into the header/footer and toggled the field code and then right clicked and went to "Edit Field...". Upon looking at the "Field properties" list box, I noticed that there is a "Project Name" and "Project Name Char" style listed. If I changed my field code to be {STYLEREF "Project Name Char" } then it works just fine. After playing around a bit, I can get the "xxx Char" to show up if I select the text and in the "Styles and Formatting" toolbar select the style and right click and select "Update to match selection". Now, if I delete the original style, the one with "Char" tacked on the end is left hanging around. I guess I have my answer, so thanks for your help. If you have any thoughts on my confusion about the "Char" above, I am always will willing to learn. Cheers, Dave "Suzanne S. Barnhill" wrote: I agree with Stefan. This should be working provided you've used the default (backward-looking) StyleRef field. I suspect that what has happened is that you have inserted a page break after your title paragraph (the one you're referencing) and then pressed Enter again to get a "blank line" at the top of the next page. This creates an empty paragraph in the Title style, and that's what your StyleRef field is picking up. Instead of using an empty paragraph, add some Space Before to the first paragraph on the page; because it follows a page break, it will be retained. If this analysis is way off the mark, perhaps you'd like to send me a sample document to look at. -- 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. "Dave" wrote in message ... I tried your suggestion on using the style ref method. It isn't working. The problem is that the header/footer is on the second page and the style is defined on the first and I have the headers/footers turned off for the first page. If I add the styleref to the first page in the "First Page Footer" section, then it works fine, but this is not the behavior I want. I want the header/footer to show the title on every page except the first. Any thoughts? Dave "Suzanne S. Barnhill" wrote: Possibly the easiest method (instead of a bookmark) would be to apply a character style to the Project Name field code and use a StyleRef field in the header/footer. Alternatively, you could use a UserForm to collect the name and write it to a custom document property and use a DocProperty field in the header/footer. The advantage of StyleRef is that it updates automatically and instantly, whereas fields can be balky about updating (though fields in the header/footer are always updated at print time or on Print Preview). -- 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. "Dave" wrote in message ... I want to create a template/document that has Document Name: Project Name displayed by default where Project Name is a field code that can the be updated by right clicking the mouse. Upon doing so, it would prompt the user to enter the name of the project and then say Document Name: My Wonderful Project I want to have My Wonderful Project bookmarked so as to include it in the header/footer. This was my last attempt { COMMENTS " Project Name " { { SET ProjectName { FILLIN "Input Project Name" \d " Project Name " }}} Any help would be appreciated Dave |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using IF to find whether a Merge Field contains a substring | Mailmerge | |||
Merge data if database checkbox field is True | Mailmerge | |||
Fields only display the code not the data!! | Microsoft Word Help | |||
How do I replace one character with another in the field code resu | Mailmerge | |||
How do I replace 1 character with another in field code results? | Microsoft Word Help |