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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vincent90152900
    New Member
    • Jul 2007
    • 50

    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.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by vincent90152900
    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.

    Comment

    • vincent90152900
      New Member
      • Jul 2007
      • 50

      #3
      Originally posted by Killer42
      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.

      Comment

      • fplesco
        New Member
        • Jul 2007
        • 82

        #4
        Originally posted by vincent90152900
        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.

        Code:
        Sub NewMacro()
            Shell "C:\windows\System32\calc.exe", vbMaximizedFocus
        End Sub

        Comment

        • vincent90152900
          New Member
          • Jul 2007
          • 50

          #5
          Thank you very much.
          It works perfectly.

          Originally posted by fplesco
          Hi -

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

          Code:
          Sub NewMacro()
              Shell "C:\windows\System32\calc.exe", vbMaximizedFocus
          End Sub

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            Originally posted by vincent90152900
            Thank you very much.
            It works perfectly.
            Thanks for that, fplesco. I was in too much of a rush to go into detail.

            Comment

            • fplesco
              New Member
              • Jul 2007
              • 82

              #7
              Originally posted by Killer42
              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.

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Originally posted by fplesco
                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.

                Comment

                Working...