![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]()
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 |
#2
|
|||
|
|||
![]()
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. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
Suchoklates | Word | 1 | 09-19-2013 02:32 AM |
Bookmarks with different figure references | Dan_68 | Word | 0 | 02-15-2010 08:29 PM |