![]() |
|
#1
|
|||
|
|||
|
I call my macro from a button in the quick access toolbar. When I load my template which contains a bookmark I want the button enabled. When I load a different template that does not contain the specific bookmark I want the button disabled.
How do I do this? I can't see how to enable / disable the button. I could use the custom ribbon if this would work better, or an alternate method. I think you can see what I am trying to achieve. I'm using word 2010. Thanks in advance for your help |
|
#2
|
||||
|
||||
|
Hi dbp001,
If the button loads with, say, your Normal template, disabling it is probably not practical. However, since it seems the macro should only be run when a particular bookmark exists, Why not simply add some code to test for that boomark. For example: Code:
If ActiveDocument.Bookmarks.Exists("MyBookmark") = False Then
MsgBox "Hey, you REALLY shouldn't do that", vbExclamation
Exit Sub
End If
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to make Quick Access Toolbar icons smaller in XP
|
WaltR | Word | 1 | 04-09-2012 11:42 AM |
Email button on quick access toolbar
|
castman | Word | 3 | 01-17-2012 02:24 PM |
| add macro to quick access toolbar | TessaLee | Word VBA | 2 | 03-16-2011 06:31 PM |
| Word 2007 - edit appearance of icons on quick access toolbar | hkeiner | Word | 0 | 07-23-2010 01:42 PM |
| Quick Access Toolbar | pmokover | Word | 0 | 10-30-2009 07:25 PM |