Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2018, 11:57 PM
nsv nsv is offline Open macro selector (ALT+F8) in VBA Windows 8 Open macro selector (ALT+F8) in VBA Office 2013
Novice
Open macro selector (ALT+F8) in VBA
 
Join Date: Jul 2010
Location: Denmark
Posts: 17
nsv is on a distinguished road
Default 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
Of course this one does not work, but I hope you get the idea. I know that the instruction 'ShowVisualBasicEditor = True' works, but that is not what I am after.

NSV
Reply With Quote
  #2  
Old 09-18-2018, 12:04 AM
gmayor's Avatar
gmayor gmayor is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Code:
Dialogs(wdDialogToolsMacro).Show
will show the macro dialog, but there are much better ways of making macros readily available to documents e.g. creating a custom ribbon tab.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 09-18-2018, 12:04 AM
Guessed's Avatar
Guessed Guessed is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #4  
Old 09-18-2018, 06:34 AM
nsv nsv is offline Open macro selector (ALT+F8) in VBA Windows 8 Open macro selector (ALT+F8) in VBA Office 2013
Novice
Open macro selector (ALT+F8) in VBA
 
Join Date: Jul 2010
Location: Denmark
Posts: 17
nsv is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 09-18-2018, 05:16 PM
Guessed's Avatar
Guessed Guessed is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #6  
Old 09-18-2018, 08:05 PM
gmayor's Avatar
gmayor gmayor is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #7  
Old 09-18-2018, 10:53 PM
nsv nsv is offline Open macro selector (ALT+F8) in VBA Windows 8 Open macro selector (ALT+F8) in VBA Office 2013
Novice
Open macro selector (ALT+F8) in VBA
 
Join Date: Jul 2010
Location: Denmark
Posts: 17
nsv is on a distinguished road
Default

Thanks for the tips

NSV
Reply With Quote
  #8  
Old 09-19-2018, 04:29 PM
macropod's Avatar
macropod macropod is offline Open macro selector (ALT+F8) in VBA Windows 7 64bit Open macro selector (ALT+F8) in VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by gmayor View Post
I get a 404 not found error with that link. Try: https://docs.microsoft.com/en-us/pre...1(v=office.14)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 09-19-2018, 08:07 PM
gmayor's Avatar
gmayor gmayor is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #10  
Old 09-19-2018, 08:43 PM
macropod's Avatar
macropod macropod is offline Open macro selector (ALT+F8) in VBA Windows 7 64bit Open macro selector (ALT+F8) in VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I think the forum software helpfully put your closing ) outside the URL...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 09-20-2018, 12:59 AM
gmayor's Avatar
gmayor gmayor is offline Open macro selector (ALT+F8) in VBA Windows 10 Open macro selector (ALT+F8) in VBA Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open macro selector (ALT+F8) in VBA Macro to Open to a Website When No Document Is Open lostinwebspace Word VBA 1 02-13-2016 10:28 AM
Open macro selector (ALT+F8) in VBA 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
Open macro selector (ALT+F8) in VBA 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft