Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2022, 03:21 AM
Twistedmouse Twistedmouse is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Novice
Auto populate footer text from Dropdown form field
 
Join Date: Sep 2022
Posts: 5
Twistedmouse is on a distinguished road
Default Auto populate footer text from Dropdown form field

Hi,



Im rather new to visual basics and using form fields/content control in MS Word, I am trying to populate my footer with different company entity's that are listed in a drop-down menu iv tried REF, STYLEREF (I noticed you can use this with free text fields but not drop down), and afew example macros but couldnt really understand it.

Would anyone have a solution?
Reply With Quote
  #2  
Old 09-23-2022, 05:54 AM
kilroyscarnival kilroyscarnival is offline Auto populate footer text from Dropdown form field Windows 10 Auto populate footer text from Dropdown form field Office 2021
Expert
 
Join Date: May 2019
Posts: 344
kilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nicekilroyscarnival is just really nice
Default

Quote:
Originally Posted by Twistedmouse View Post
Hi,

Im rather new to visual basics and using form fields/content control in MS Word, I am trying to populate my footer with different company entity's that are listed in a drop-down menu iv tried REF, STYLEREF (I noticed you can use this with free text fields but not drop down), and afew example macros but couldnt really understand it.

Would anyone have a solution?
I'm not completely sure what content has to be in there or how dynamic it has to be. But, have you thought of just having different custom footers saved as Quick Parts that can be inserted with the Insert/Footer button on the Insert ribbon?
Reply With Quote
  #3  
Old 09-23-2022, 09:45 AM
Charles Kenyon Charles Kenyon is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You should be able to use the StyleRef field assuming you have applied the correct style.

You could also map your drop-down content control to an XML part and copy it in the footer. Mapped Content Controls by Greg Maxey
If you want, attach a sample document with the problem.
Reply With Quote
  #4  
Old 09-23-2022, 03:24 PM
macropod's Avatar
macropod macropod is offline Auto populate footer text from Dropdown form field Windows 10 Auto populate footer text from Dropdown form field Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Charles Kenyon View Post
You should be able to use the StyleRef field assuming you have applied the correct style.
A StyleRef field, though, won't insert anything other than the specific content that's already in that Style. It won't, for example, insert address details for a company whose name has the relevant Style applied to the company name.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-23-2022, 03:28 PM
macropod's Avatar
macropod macropod is offline Auto populate footer text from Dropdown form field Windows 10 Auto populate footer text from Dropdown form field Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Twistedmouse View Post
using form fields/content control in MS Word, I am trying to populate my footer with different company entity's that are listed in a drop-down menu
Which are you using - formfields or content controls? You should not be using both in the same document. They weren't designed to be used that way and trying to do so is liable to result in document usability issues.

What are you trying to input into the document body vs the footer?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 09-26-2022, 06:34 PM
Twistedmouse Twistedmouse is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Novice
Auto populate footer text from Dropdown form field
 
Join Date: Sep 2022
Posts: 5
Twistedmouse is on a distinguished road
Default

Oh really? good to know, I wasnt aware you shouldnt use both (im actually unsure on the keywords atm im very new to this)
Basically what im trying to do is build out contracts as fillable forms but i want what ever trading name that is chosen from a drop down to populate the footer text.
if that makes sense?
Reply With Quote
  #7  
Old 09-26-2022, 06:43 PM
Twistedmouse Twistedmouse is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Novice
Auto populate footer text from Dropdown form field
 
Join Date: Sep 2022
Posts: 5
Twistedmouse is on a distinguished road
Default

Quote:
Originally Posted by kilroyscarnival View Post
I'm not completely sure what content has to be in there or how dynamic it has to be. But, have you thought of just having different custom footers saved as Quick Parts that can be inserted with the Insert/Footer button on the Insert ribbon?
Thank you thats a cool idea, my issue is this form will have restricted editing so i dont think it will be possible to insert the footer. Unless you know of a possible work around?
Reply With Quote
  #8  
Old 09-26-2022, 07:13 PM
Charles Kenyon Charles Kenyon is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

See also Creating Address Drop down.
Reply With Quote
  #9  
Old 09-26-2022, 08:05 PM
Twistedmouse Twistedmouse is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Novice
Auto populate footer text from Dropdown form field
 
Join Date: Sep 2022
Posts: 5
Twistedmouse is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
You should be able to use the StyleRef field assuming you have applied the correct style.

You could also map your drop-down content control to an XML part and copy it in the footer. Mapped Content Controls by Greg Maxey
If you want, attach a sample document with the problem.
Thank you iv attached my example of the problem hopefully its okay the way iv done it. Once iv finalized my documents ill be using them as a template for users to fill in contracts for employees. Not sure if what im trying to achieve is possible but any help will be appreciated. (the data i will need to populate would be the trading name as well as their ABN)
Attached Files
File Type: docx TestExample.docx (19.1 KB, 7 views)
Reply With Quote
  #10  
Old 09-26-2022, 09:36 PM
Guessed's Avatar
Guessed Guessed is offline Auto populate footer text from Dropdown form field Windows 10 Auto populate footer text from Dropdown form field Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Attached is a working example from your doc. This is using mapped Content Controls with multiple CCs mapped to the same xml node.
Attached Files
File Type: docx Mapped CC Example.docx (26.4 KB, 10 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #11  
Old 09-26-2022, 10:23 PM
Twistedmouse Twistedmouse is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Novice
Auto populate footer text from Dropdown form field
 
Join Date: Sep 2022
Posts: 5
Twistedmouse is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
Attached is a working example from your doc. This is using mapped Content Controls with multiple CCs mapped to the same xml node.
Thank you! That is perfect and works instantly. would you have any resources i can read to learn more about mapping myself? I think I somewhat get how it works but im curious on the set up. Also do you know if you can {REF } a tag? or is it only bookmarks?
Reply With Quote
  #12  
Old 09-27-2022, 05:00 AM
Charles Kenyon Charles Kenyon is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Thank you! That is perfect and works instantly. would you have any resources i can read to learn more about mapping myself? I think I somewhat get how it works but im curious on the set up. Also do you know if you can {REF } a tag? or is it only bookmarks?
REF only goes to a bookmark. You can put a Content Control inside a Bookmark, but why bother. If you have a mapped control, simply put another copy of the control where you would use the REF field.

References and Add-Ins:

Reply With Quote
  #13  
Old 09-28-2022, 04:53 AM
Charles Kenyon Charles Kenyon is offline Auto populate footer text from Dropdown form field Windows 11 Auto populate footer text from Dropdown form field Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by Twistedmouse View Post
Thank you iv attached my example of the problem hopefully its okay the way iv done it. Once iv finalized my documents ill be using them as a template for users to fill in contracts for employees. Not sure if what im trying to achieve is possible but any help will be appreciated. (the data i will need to populate would be the trading name as well as their ABN)

Attached is your sample using a legacy formfield instead. I used a cross-reference to the bookmark in the footer. This would be updated upon printing or using a Print Preview. If the cross-reference were in the body, it would update upon leaving the field. Again, I urge the use of the Mapped Content Control.
Attached Files
File Type: docx Deleteme TestExample.docx (20.0 KB, 3 views)
Reply With Quote
Reply

Tags
drop down, footer, macro

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-populate based on text inputted into a field by user + formulas ssims Word 1 11-30-2020 12:17 PM
Auto populate footer text from Dropdown form field Auto populate a text field based on Content Control Dropdown List matthias92701 Word VBA 2 05-02-2019 03:54 PM
Auto-populate Text Field When I Click Check Boxes LobaBlanca Word VBA 2 03-14-2019 08:10 PM
Have Text Entered in Content Control / PreDefined Field Populate Field in Footer bzowk Word 1 04-14-2016 11:50 AM
Macro to populate a text form field based on dropdown selection koloa Word 0 10-20-2011 11:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft