![]() |
#1
|
|||
|
|||
![]()
Is it possible to click on a text (e.g. one word) in office word, in such a way that it suns some lines of command prompt script.
To be more specific, I have two lines of code which I need to run in command prompt interface (CMD.EXE in windows). Instead of doing the following steps, I want to click on a text in microsoft office (e.g. MYFUNCTION) and it runs the following steps: 1- type CMD in command prompt (or open command prompt window) 2- run two codes 3- close command prompt window Thank you for your help. |
#2
|
||||
|
||||
![]()
Check out the MACROBUTTON field.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
I was able to create a command and edit it. At the moment, I have the following code:
Sub testp() ' ' testp Macro ' ' End Sub What is the command line to open CMD.EXE and then write a code and close the CMD.EXE? Thank you for your help. |
#4
|
||||
|
||||
![]()
What is the aim of the exercise? First you mentioned opening the command window and typing something in, which implies user interaction, but now it seems you simply want to 'write a code', which may not require running CMD.EXE at all.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2013 ActiveX Command Button Failure | irallfml@gmail.com | Word VBA | 1 | 05-23-2014 04:19 PM |
From the command line, how do I run a Word macro? | jdockstader | Word | 7 | 02-04-2013 06:09 AM |
Edit Points command grayed out in Word 2003 | JohnB | Word | 2 | 01-27-2012 09:26 AM |
![]() |
tinfanide | Word VBA | 2 | 12-02-2011 05:51 AM |
Invoking a command line from inside Word | bolpom | Word | 1 | 03-16-2011 03:03 AM |