Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculator on the Tool Bar
How to add Calculator as an icon on the Tool Bar of MS Word 2003 for easy
access. Thanks in advance.. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculator on the Tool Bar
Hi S:
Just place a module with a macro such as this- Private Sub CommandButton2_Click() Dim WshShell As Object Set WshShell = CreateObject("Wscript.Shell") WshShell.Run "Calc" Set WshShell = Nothing End Sub You can also do other API callups, s.a.- -- WshShell.Run "NotePad" (or "NotePad C:\MyTrains.txt" to bring up a file) -- WshShell.Run "Explorer" Cheers, Al "SGangs" wrote: How to add Calculator as an icon on the Tool Bar of MS Word 2003 for easy access. Thanks in advance.. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Calculator on the Tool Bar
VBA also has a Shell method that can launch executables without the
Wscript.Shell. It does require the full path to the executable file, though. For the calculator, the macro would be Sub RunCalc() Shell "c:\windows\system32\calc.exe", vbNormalFocus End Sub Also note that if you want to put a button on a toolbar (rather than on a userform), the first line should start with Sub (or Public Sub, but Public is the default and can be left out) and not with Private. Procedures that are marked Private won't appear in the list of macros in the Customize dialog, which makes it hard to assign them to toolbar buttons. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. alborg wrote: Hi S: Just place a module with a macro such as this- Private Sub CommandButton2_Click() Dim WshShell As Object Set WshShell = CreateObject("Wscript.Shell") WshShell.Run "Calc" Set WshShell = Nothing End Sub You can also do other API callups, s.a.- -- WshShell.Run "NotePad" (or "NotePad C:\MyTrains.txt" to bring up a file) -- WshShell.Run "Explorer" Cheers, Al "SGangs" wrote: How to add Calculator as an icon on the Tool Bar of MS Word 2003 for easy access. Thanks in advance.. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XP 2003 Calculator Button | New Users | |||
Getting Calculator to stay on top of Window pane | Microsoft Word Help | |||
Calculator use | Microsoft Word Help | |||
how do i do taesting for my course calculator? | Microsoft Word Help | |||
How can I put a calculator icon on my toolbar? | Microsoft Word Help |