Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2016, 07:05 PM
Guessed's Avatar
Guessed Guessed is offline Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work Windows 10 Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

You haven't specified where the code is failing. However if the function is throwing an error like that then there are only two possibilities:


1. There is no activedocument.
2. You are passing a bookmark name that doesn't exist in the activedocument.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 06-29-2016, 10:03 AM
mrsjetset mrsjetset is offline Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work Windows 10 Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work Office 2016
Novice
Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work
 
Join Date: Jun 2016
Posts: 5
mrsjetset is on a distinguished road
Default

Alright, got that situation all worked out. I think I was using an incorrect copy of the document where the bookmark had been replaced and not re-added (operator error) because I re-added the subroutine and set it up for all the bookmarks, and everything is hunky-dory with that part now.

The bigger issue that I have left is that the userform doesn't Unload on cmdClick_OK, even though I have Unload Me as the last line before the end of the subroutine. I click the X and it goes away, but I'd like for the OK click to populate the document and close the form. I think it's possible, but I'm not 100% sure. If I have to add in a Close button it's not the end of the world, but from everything I've read it seems Unload Me should work. Can't seem to find a good reference for Word VBA that's current.

Next issue is the cross-references keep the format of the original bookmark. I thought I read somewhere that there was a way to tell them to keep their own formatting and use just the value of the bookmark, but I have searched again and cannot seem to find what the solution to that was, nor have I been able to recall it.

A third, much more minor issue, is that my userform is "multipage" and I can't figure out how to set it up so it always shows the first page first. Seems that whichever page I'm on when I save it is the one the userform opens on. This is, however, a very minor issue, and I don't anticipate a lot of changes once the form is in use so it's not a big deal, I just wondered if there was a property I needed to change the value of.

If I need to post the code or the file I'm happy to do so, as long as the forum will agree with me today.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work How to make a SEQ field show up in cross references? Roscoe Word 5 06-01-2016 01:39 PM
Outlook 2013 - How to make "deleted" items to to the DELETED folder? drgerry Outlook 3 05-16-2016 05:18 AM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work Bookmarks & cross-references Suchoklates Word 1 09-19-2013 02:32 AM
Bookmarks with different figure references Dan_68 Word 0 02-15-2010 08:29 PM

Other Forums: Access Forums

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