Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2014, 07:17 AM
G920 G920 is offline Need help inserting variables onto word document Windows 7 32bit Need help inserting variables onto word document Office 2010 32bit
Novice
Need help inserting variables onto word document
 
Join Date: Dec 2014
Posts: 3
G920 is on a distinguished road
Default Need help inserting variables onto word document

Hello

I'm creating a word document that changes depending on the client.

I've searched Google for help with adding variables but when I try to create my own I seem to make a mistake.

I basically need [First_Name] [Surname] [Company_Name]

So far I have done the following:


-Menu button in top left
-Prepare>Properties
-Document properties>Advanced properties
-Custom>Name=[First_Name]>Value=[First_Name]>Add

Is this the best method to use? I've seen people attempt different ways by using Labels in the mail merge tab.

Any advice would be greatly appreciated

Gregos
Reply With Quote
  #2  
Old 12-12-2014, 07:44 AM
Charles Kenyon Charles Kenyon is offline Need help inserting variables onto word document Windows 7 64bit Need help inserting variables onto word document Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

There are lots of ways to do what you want. They include document properties, document variables (much harder), Mail Merge, and AutoText.

If this is a document you are creating and mailing or sending by pdf (not sending as a Word document), mailmerge is probably the simplest. If it is a document that you are creating for their use as one of many, you want to be creating a template. You could have AutoText entries in the template displayed by AutoText fields.
Reply With Quote
  #3  
Old 12-12-2014, 07:56 AM
G920 G920 is offline Need help inserting variables onto word document Windows 7 32bit Need help inserting variables onto word document Office 2010 32bit
Novice
Need help inserting variables onto word document
 
Join Date: Dec 2014
Posts: 3
G920 is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
There are lots of ways to do what you want. They include document properties, document variables (much harder), Mail Merge, and AutoText.

If this is a document you are creating and mailing or sending by pdf (not sending as a Word document), mailmerge is probably the simplest. If it is a document that you are creating for their use as one of many, you want to be creating a template. You could have AutoText entries in the template displayed by AutoText fields.
How would I use AutoText fields?

I think the template would be the best bet for this document.
Reply With Quote
  #4  
Old 12-12-2014, 08:21 AM
gmayor's Avatar
gmayor gmayor is offline Need help inserting variables onto word document Windows 7 64bit Need help inserting variables onto word document Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,106
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 you are creating a template, then create a simple userform for it to insert the variable data - see http://www.gmayor.com/Userform.htm
__________________
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
  #5  
Old 12-14-2014, 09:39 AM
Charles Kenyon Charles Kenyon is offline Need help inserting variables onto word document Windows 7 64bit Need help inserting variables onto word document Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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 G920 View Post
How would I use AutoText fields?

I think the template would be the best bet for this document.
First, I agree with Graham that this could be suited for a userform if it will be used in an environment that allows use of macros.

To insert an AutoText field named firmmail, you can type "AutoText firmmail" without the quotation marks, select what you just typed, press Ctrl+F9 and then F9. Before you press the F9 key it will look like { AutoText firmmail }. After you press F9 it will display whatever the entry holds. Note, you cannot simply type the braces {}; you must use the Ctrl+F9 to insert them as a pair.

You must create/save the AutoText entry first. Again, which tool will work best depends very much on what it is you are trying to do.

The same method can be used to display document variables or custom document properties. Instead you would be using { DocVariable firmmail } or { DocProperty firmmail } fields instead. "Firmmail" is the name of custom document property or document variable that you created.

Unlike AutoText, document properties and/or variables in a template become embedded in a document created from the template. Graham and Greg Maxey worked together to create a tool which makes it easy to insert either. CC⁄V⁄BM & DP Tools Add-in That is not part of the interface, you have to download it and use it. It is the simplest way I know to insert document variables without programming.
Reply With Quote
  #6  
Old 12-15-2014, 02:13 AM
G920 G920 is offline Need help inserting variables onto word document Windows 7 32bit Need help inserting variables onto word document Office 2010 32bit
Novice
Need help inserting variables onto word document
 
Join Date: Dec 2014
Posts: 3
G920 is on a distinguished road
Default

Document is finally complete.

Thank you guys for all your help!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
can word: make variables, find appropriate pages, fill out pages with variables, print only those 20GT Word VBA 1 10-15-2014 09:48 PM
Same values of variables in word add-in are being shared across multiple document naq.abbas@gmail.com Word 0 01-13-2014 10:41 AM
Need help inserting variables onto word document Inserting text field into word document BeataG Word VBA 2 01-03-2014 12:56 AM
Need help inserting variables onto word document word 2007 - Inserting value in the document header chamdan Word VBA 7 11-15-2013 05:06 PM
Need help inserting variables onto word document Powerpoint inserting and editing a word document Zeeb PowerPoint 2 02-12-2012 02:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:24 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