473,414 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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

Is it possible to use a word macro to execute an .exe file?
How to do that?
This is discussion is open to suggestions.
Many thanks for your replying.
Aug 15 '07 #1
7 16401
Killer42
8,435 Expert 8TB
Is it possible to use a word macro to execute an .exe file?
How to do that?
This is discussion is open to suggestions.
Many thanks for your replying.
I guess you just create a new macro, and enter a Shell command to run your EXE.
Aug 15 '07 #2
I guess you just create a new macro, and enter a Shell command to run your EXE.
Thank you for your suggestion.
Can you give me a code example?
Thank you very much.
Aug 15 '07 #3
fplesco
82
Is it possible to use a word macro to execute an .exe file?
How to do that?
This is discussion is open to suggestions.
Many thanks for your replying.
Hi -

It is possible to run exe file using Word Macro. See sample below.

Expand|Select|Wrap|Line Numbers
  1. Sub NewMacro()
  2.     Shell "C:\windows\System32\calc.exe", vbMaximizedFocus
  3. End Sub
  4.  
Aug 15 '07 #4
Thank you very much.
It works perfectly.

Hi -

It is possible to run exe file using Word Macro. See sample below.

Expand|Select|Wrap|Line Numbers
  1. Sub NewMacro()
  2.     Shell "C:\windows\System32\calc.exe", vbMaximizedFocus
  3. End Sub
  4.  
Aug 16 '07 #5
Killer42
8,435 Expert 8TB
Thank you very much.
It works perfectly.
Thanks for that, fplesco. I was in too much of a rush to go into detail.
Aug 16 '07 #6
fplesco
82
Thanks for that, fplesco. I was in too much of a rush to go into detail.
It's okay Killer. Even superman needs help, sometimes.
Aug 16 '07 #7
Killer42
8,435 Expert 8TB
It's okay Killer. Even superman needs help, sometimes.
:) To be fair, I would have had to look up the correct syntax, too. Otherwise I would have taken the extra 20 or 30 seconds to throw it into the message.
Aug 16 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: MSNEWS | last post by:
Hi I have a VB.NET app which reads thru a list of directories containing word files, converts the file to text and then loads into a SQL SERVER table. To avoid any word issues (macro virus,...
0
by: David Krmpotic | last post by:
Regards, I need a little explanation in converting word VB macros to charp code! first, I recorded simple macro which replaces every occurence of one word in whole document (is it?) , here:...
3
by: Martin Austin | last post by:
Here's my problem. I'm launching an MS Word object on a Notes document Postopen event. The script kicks off a macro that saves the Word document to a temporary file every n minutes (backup of key...
0
by: Simon | last post by:
I'm using the following to open and run a macro in word wordApp.Documents.Open(MyDoc) wordApp.Run("CatgTitle") wordApp.save() The Macro goes through each item in Column A and based on the...
8
by: John Salerno | last post by:
I figured my first step is to install the win32 extension, which I did, but I can't seem to find any documentation for it. A couple of the links on Mark Hammond's site don't seem to work. ...
0
by: derelict | last post by:
Hey all, im getting desperate now. I have a macro running in Word 2003, when I run the macro it *should* put a 'bottom' cell border in each cell that has the style used - this included a border at...
6
by: Eric Layman | last post by:
Hi, I have fields from textareas. With a click of a button, php is able to grab these fields and by using header(), convert the output to Ms Word doc. But the outcome of the word doc...
0
by: A1000ma | last post by:
I am trying to develop a C# program to fill in the blanks in a Word Form. Everything works beautifully while the program is running. I had to go in to fix some links on our Web Site a couple of...
1
by: Jstyle | last post by:
I have a macro in MS Word that does several hundred find and replace statements. The problem is each time it does a find and replace it prompts me do you want to search from the begining. How do I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.