#1
|
|||
|
|||
Open macro selector (ALT+F8) in VBA
I wonder if it is possible to make a Word document start with the macro selector (ALT+F8) activated; something like this:
Code:
Private Sub Document_Open() MsgBox "Instruction:" & vbNewLine & _ "" & vbNewLine & _ "This document is a template with a number of macros for selecting the relevant icons." ShowMacroSelector = True End Sub NSV |
#2
|
||||
|
||||
Code:
Dialogs(wdDialogToolsMacro).Show
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
Is it this dialog you are looking for?
Code:
Sub ShowMacros() Dialogs(wdDialogToolsMacro).Display End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia Last edited by Guessed; 09-18-2018 at 12:05 AM. Reason: Drat: Beaten by Graham yet again |
#4
|
|||
|
|||
Excellent!!! Thank you very much.
Now I just wonder - how did you know this is the code? I have googled and searched and digged without finding the answer and I would like to be able to find this kind of information in a systematic way. |
#5
|
||||
|
||||
I don't have a system. It comes with following these types of forums over 20+ years. Start with a google search and read items that sound close and then try refining your search with keywords that look like they are heading in the right direction. As you read more, you learn what keywords work better than others.
For this one, I just typed directly into the VBA editor "Dialogs(" and then used Intellisense to view all the options until I find one that looks about right.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
||||
|
||||
See https://docs.microsoft.com/en-us/pre...30(v=office.11) It's an old link but still appropriate and gives you the switches appropriate to each command.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#7
|
|||
|
|||
Thanks for the tips
NSV |
#8
|
||||
|
||||
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
||||
|
||||
Hmmm. That's odd. The link as posted produces a 404 error yet I copied it from the address bar of my browser where the expanded link works Thanks for the replacement link.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#10
|
||||
|
||||
I think the forum software helpfully put your closing ) outside the URL...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#11
|
||||
|
||||
That would explain it
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to Open to a Website When No Document Is Open | lostinwebspace | Word VBA | 1 | 02-13-2016 10:28 AM |
MS Word 2010 Table Selector Selects Header On One Page and Rows On Next Page | scptech | Word Tables | 4 | 01-11-2016 02:55 PM |
can I run a macro when I open a specific doc ?? | ximpostor | Word VBA | 10 | 10-12-2012 12:35 PM |
macro to open another document | coconutt | Word VBA | 1 | 06-11-2012 04:39 AM |
can I run a macro when I open a specific doc. | shreked | Word | 8 | 01-12-2012 03:36 AM |