Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Missing Bookmarks Causing Errors?
Hi there,
Hopefully this will make sense, here goes.......I create templates in Word XP - for some reason, if someone inadvertently deletes a bookmark an error occurs while trying to run other macros within the template or while simply trying to make revisions to a document (created with it). People tend to delete them because they don't know what they are. This never used to happen before (I'm assuming it's due to a patch or upgrade run by our Administrator/IT group). Is there "any" way at all I can protect them or put a line of code that would not allow them to be deleted? Or any other solution for that matter? Thanks as always for your advice and help Beth |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Missing Bookmarks Causing Errors?
You need to modify your macros to defend against the problem: either use the
..Exists function to test for the existence of the macro, or use error trapping. "Beth" wrote in message ... Hi there, Hopefully this will make sense, here goes.......I create templates in Word XP - for some reason, if someone inadvertently deletes a bookmark an error occurs while trying to run other macros within the template or while simply trying to make revisions to a document (created with it). People tend to delete them because they don't know what they are. This never used to happen before (I'm assuming it's due to a patch or upgrade run by our Administrator/IT group). Is there "any" way at all I can protect them or put a line of code that would not allow them to be deleted? Or any other solution for that matter? Thanks as always for your advice and help Beth |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Missing Bookmarks Causing Errors?
Thanks so much Jezebel, sounds like it is something I can prevent then....
Now I apologize but I'm not an expert and am still learing all this 'code business' - is there somewhere (possibly a link) that I can look for some ideas on exactly how to do this? : ) Thanks again Beth "Jezebel" wrote: You need to modify your macros to defend against the problem: either use the ..Exists function to test for the existence of the macro, or use error trapping. "Beth" wrote in message ... Hi there, Hopefully this will make sense, here goes.......I create templates in Word XP - for some reason, if someone inadvertently deletes a bookmark an error occurs while trying to run other macros within the template or while simply trying to make revisions to a document (created with it). People tend to delete them because they don't know what they are. This never used to happen before (I'm assuming it's due to a patch or upgrade run by our Administrator/IT group). Is there "any" way at all I can protect them or put a line of code that would not allow them to be deleted? Or any other solution for that matter? Thanks as always for your advice and help Beth |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Missing Bookmarks Causing Errors?
Hi Beth,
is there somewhere (possibly a link) that I can look for some ideas on exactly how to do this? : ) Assuming the bookmark's name is BK1: If ActiveDocument.Bookmarks.Exists("BK1") Then 'Do whatever, the bookmark is there Else 'Do something else, or nothing, because it's missing End If If I have a lot of these tests, and the action I want to perform for the bookmarks is basically the same, I'll put this in a separate function so that I don't have to repeat it multiple times. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Missing Bookmarks Causing Errors?
Thanks for the tip Cindy - I'll give it a try and see what happens (after I
visit your homepage of course : ) Beth "Cindy M." wrote: Hi Beth, is there somewhere (possibly a link) that I can look for some ideas on exactly how to do this? : ) Assuming the bookmark's name is BK1: If ActiveDocument.Bookmarks.Exists("BK1") Then 'Do whatever, the bookmark is there Else 'Do something else, or nothing, because it's missing End If If I have a lot of these tests, and the action I want to perform for the bookmarks is basically the same, I'll put this in a separate function so that I don't have to repeat it multiple times. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
C# MailMerge from Excel | Mailmerge | |||
bookmarks shown in doc | Microsoft Word Help | |||
Errors with Hyperlinks to Bookmarks | Microsoft Word Help | |||
Bookmarks, hyperlinks and 'save as' | Microsoft Word Help | |||
Bookmarks appearing in HTML Format document links | Microsoft Word Help |