Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-04-2022, 08:39 AM
Italophile Italophile is offline How can I re-populate my userform after closing the document? Windows 11 How can I re-populate my userform after closing the document? Office 2021
Expert
 
Join Date: Mar 2022
Posts: 554
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

As your bookmarks enclose the text you insert all you need to do is reverse the logic of your existing code. You would put this code into the Initialize event of the user form, e.g.

Code:
Private Sub UserForm_Initialize()
    Me.TextBoxClientCompanyName.Value = ActiveDocument.Bookmarks("NameOfClientHeader").Range.Text
End Sub
Reply With Quote
 

Tags
bookmarks, populate, userform

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I re-populate my userform after closing the document? How to populate a userform combobox from a table in the same document jrooney7 Word VBA 2 04-14-2019 06:30 PM
Dynamic Userform multiselect listbox populate trevorc Excel Programming 1 12-03-2018 02:49 PM
Userform calls other userform, then populate worksheet Lehoi Excel Programming 0 02-03-2016 02:58 PM
Trying to populate Word bookmarks with excel UserForm smd1112 Excel Programming 7 09-03-2014 09:42 PM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM

Other Forums: Access Forums

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