Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2022, 03:23 AM
hkrawick@gmail.com hkrawick@gmail.com is offline Reset Word Document Bookmark Values Windows 7 64bit Reset Word Document Bookmark Values Office 2016
Novice
Reset Word Document Bookmark Values
 
Join Date: Jul 2022
Posts: 15
hkrawick@gmail.com is on a distinguished road
Default Reset Word Document Bookmark Values


I have created a userform in word that populates via bookmarks. I want to be able to clear the values in the bookmarks so the user can launch the form again to re-use it over and over again. What VBA code will do this? So far the only way the bookmarks clear the values is if I close the document and reopen it without saving.
Reply With Quote
  #2  
Old 07-28-2022, 03:54 AM
Guessed's Avatar
Guessed Guessed is offline Reset Word Document Bookmark Values Windows 10 Reset Word Document Bookmark Values Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
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

Bookmarks are too problematic, I recommend you use Content Controls instead.

You can use the Title or Tag property on the Content Controls as the trigger to align them with the controls on the userform.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-28-2022, 02:35 PM
macropod's Avatar
macropod macropod is offline Reset Word Document Bookmark Values Windows 10 Reset Word Document Bookmark Values Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You shouldn't be doing it this way. Rather, you should be creating a template with whatever your defaults are and having the users create new documents from that. No code required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 07-28-2022, 04:28 PM
hkrawick@gmail.com hkrawick@gmail.com is offline Reset Word Document Bookmark Values Windows 7 64bit Reset Word Document Bookmark Values Office 2016
Novice
Reset Word Document Bookmark Values
 
Join Date: Jul 2022
Posts: 15
hkrawick@gmail.com is on a distinguished road
Default Thanks you

Thank you both for responding. I will check out content controls. I thought about using just a template, but I need the user to only see limited things based on selections so I felt the userform could accomplish that.
Reply With Quote
  #5  
Old 07-28-2022, 04:35 PM
macropod's Avatar
macropod macropod is offline Reset Word Document Bookmark Values Windows 10 Reset Word Document Bookmark Values Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Userforms and templates are not mutually exclusive... If you already have a document with a userform that works with bookmarks, simply save it as a Word template.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 07-29-2022, 05:48 PM
hkrawick@gmail.com hkrawick@gmail.com is offline Reset Word Document Bookmark Values Windows 7 64bit Reset Word Document Bookmark Values Office 2016
Novice
Reset Word Document Bookmark Values
 
Join Date: Jul 2022
Posts: 15
hkrawick@gmail.com is on a distinguished road
Default

That was exactly was I was thinking as well. To save it as a template.
Reply With Quote
Reply

Tags
clear bookmark values



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset Word Document Bookmark Values VBA to identify alpha numeric values in a word document and create a list of those values olson.jacob720 Word VBA 0 04-18-2022 10:44 AM
Reset Word Document Bookmark Values word 2002 hyperlink to a bookmark in the same document anon125 Word 4 11-24-2020 02:16 PM
Reset Word Document Bookmark Values split word document based on bookmarks with each new document title of the bookmark megatronixs Word VBA 9 09-05-2020 02:29 PM
Word document with VBA and Form Fields reset when select File,Print fatal.lordes Word VBA 9 04-27-2018 11:30 PM
Reset Word Document Bookmark Values Reset Word Document gaafar.dafalla@illinois.g Word 1 12-01-2015 04:39 PM

Other Forums: Access Forums

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