Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Beth Beth is offline
external usenet poster
 
Posts: 46
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Beth Beth is offline
external usenet poster
 
Posts: 46
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Beth Beth is offline
external usenet poster
 
Posts: 46
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# MailMerge from Excel Chris Mailmerge 9 August 3rd 06 02:57 PM
bookmarks shown in doc BorisS Microsoft Word Help 5 July 11th 06 11:37 PM
Errors with Hyperlinks to Bookmarks mms2006 Microsoft Word Help 1 June 11th 06 04:51 AM
Bookmarks, hyperlinks and 'save as' PhenyxFire Microsoft Word Help 0 June 6th 06 08:20 PM
Bookmarks appearing in HTML Format document links AndyBear Microsoft Word Help 3 June 1st 05 02:45 PM


All times are GMT +1. The time now is 07:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"