Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2017, 07:29 PM
jmattingly85 jmattingly85 is offline Form Help/Suggestion Windows 7 64bit Form Help/Suggestion Office 2016
Novice
Form Help/Suggestion
 
Join Date: Jul 2017
Posts: 6
jmattingly85 is on a distinguished road
Default Form Help/Suggestion

Hello,



I have a set of Word documents (about 25) that have a pull down box with names. Based on the name selected, when you press tab, three other fields populate (address, phone and fax number - this is setup with an if statement in between { } ). We are frequently adding to these, and it takes some time to create the if statement for each form. I am wondering if there is a way to setup some type of control document that the information is added to there and it updates on the Word docs instead of having to update each one individually?

Thank you in advance for your help!
Reply With Quote
  #2  
Old 07-04-2017, 04:51 AM
gmayor's Avatar
gmayor gmayor is offline Form Help/Suggestion Windows 10 Form Help/Suggestion Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If I was doing this, I would create an Excel worksheet that has columns with the names and their associated data and in the document a selection of content controls that correspond to the columns of the worksheet. I would then pop up a userform to select the name from the worksheet and insert the data into the various content controls as appropriate.

At its simplest would be the attached. Put both files in the same folder and create a new document from the template. Click in the first content control and you will see an example of what I mean.

Edit the worksheet as appropriate (don't change the columns without changing the code).
Attached Files
File Type: dotm Example1.dotm (41.0 KB, 28 views)
File Type: xlsx Addresses.xlsx (8.3 KB, 20 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 08-09-2017, 05:48 PM
jmattingly85 jmattingly85 is offline Form Help/Suggestion Windows 7 64bit Form Help/Suggestion Office 2016
Novice
Form Help/Suggestion
 
Join Date: Jul 2017
Posts: 6
jmattingly85 is on a distinguished road
Default

Thank you for the response. Is it possible for the Excel document to be stored in a different folder?
Reply With Quote
  #4  
Old 08-09-2017, 08:14 PM
gmayor's Avatar
gmayor gmayor is offline Form Help/Suggestion Windows 10 Form Help/Suggestion Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Change the path in the userform code from
Code:
Private Sub UserForm_Initialize()
    xlFillList ComboBox1, 1, ThisDocument.Path & "\Addresses.xlsx", "Sheet1"
End Sub
to reflect the path of the worksheet e.g.
Code:
Private Sub UserForm_Initialize()
    xlFillList ComboBox1, 1, "C:\Newpath\Addresses.xlsx", "Sheet1"
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Help/Suggestion How do I disable this annoying suggestion box? sand3 Word 4 12-18-2016 03:58 PM
Form Help/Suggestion Wildcard suggestion please! psychson Word 4 05-27-2016 03:27 PM
Suggestion for powerpoint presentation on sofware products jamesdann PowerPoint 0 01-08-2014 02:57 AM
Spelling check - No suggestion Patictor Word 0 10-11-2011 12:24 AM
Suggestion required domex Word 0 10-06-2010 05:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:21 AM.


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