Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-26-2019, 02:50 AM
gmayor's Avatar
gmayor gmayor is offline Generating coversheets using inputboxes Windows 10 Generating coversheets using inputboxes Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 ofgmayor has much to be proud of
Default

It writes ABC and 123 because Greg hard coded that into the template code rather than the strName and strNum from the userform, no doubt while testing if his code worked to populate the controls in the loop (the incrementing date being the important bit of the code), and then forgot to replace the fixed texts with the string variables. It's easily done.

Code:
      .ContentControls(1).Range.Text = "ABC"
      .ContentControls(2).Range.Text = "123"
The date format is set in the date content control properties, but once changed the autotext entry also has to be updated as that contains a copy of the template body with the three content controls.

See attached
Attached Files
File Type: dotm Create Date Cover Sheets.dotm (50.6 KB, 9 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
 

Tags
inputbox

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating coversheets using inputboxes generating a calendar jimmy2016 Mail Merge 2 09-28-2016 11:09 PM
Generating coversheets using inputboxes Generating a Letter Shanna86 Word 9 09-29-2015 09:11 PM
Generating coversheets using inputboxes generating a number in Word John P Word 1 05-31-2012 10:29 PM
Generating Buy/Sell signals accordingly... babapusy Excel 0 04-14-2012 10:11 AM
MS Word 2003 – Generating a ToC krazykasper Word 1 04-29-2009 02:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:37 AM.


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