Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Is it possible to use a word macro to execute a .exe file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vincent - 15 Aug 2007 07:28 GMT
Is it possible to use a word macro to execute a .exe file?
How to do that?
This is discussion is open to suggestions.
Many thanks for your replying.
Graham Mayor - 15 Aug 2007 07:32 GMT
Yes eg

Sub Calculator()
Dim RetVal
RetVal = Shell("C:\WINDOWS\SYSTEM32\CALC.EXE", 1)
End Sub

This is covered in vba help

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Is it possible to use a word macro to execute a .exe file?
> How to do that?
> This is discussion is open to suggestions.
> Many thanks for your replying.
vincent - 15 Aug 2007 07:48 GMT
Thank you very much.
It works perfectly.

"Graham Mayor" 來函:

> Yes eg
>
[quoted text clipped - 9 lines]
> > This is discussion is open to suggestions.
> > Many thanks for your replying.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.