Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-18-2020, 06:21 PM
Guessed's Avatar
Guessed Guessed is offline Naming a variable using userform fields Windows 10 Naming a variable using userform fields Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
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

I'm not seeing how you plan to make use of the document variables in the document itself. I assume your other code is looping through the variables that exist and then places fields into the document at relevant positions. You are going to have broken fields unless you also have macros to clean up content when variables don't exist.

If you need further help on this, post a sample document showing how your userform is coded and a couple of examples of where variables are used in the body of the document.

FWIW, I have never used Document Variables as I didn't like having stuff I couldn't also see and edit with the GUI. When I had similar requirements I used Document Built-in and Custom properties. Nowdays I make use of XML and linked Content Controls for these types of tasks. Linked CCs allow contents of these variables to be populated directly from the document, don't require field updates to refresh and are more forgiving when backend fields are missing.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show userForm from variable Cosmo Word VBA 5 01-31-2018 12:59 PM
Naming a variable using userform fields Assigning a string variable to a userform label caption Larry_1 Excel Programming 3 12-18-2017 06:59 AM
Project - variable data fields pmarc Word 7 04-04-2013 05:07 PM
30+ days Variable Day Date Calculations via Fields ztag Word 2 01-06-2012 11:12 AM
Variable fields? Emalee77 PowerPoint 0 01-30-2011 05:58 PM

Other Forums: Access Forums

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


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