Run Word from Excel VBA

G

Guest

Excel Experts,

I would like to create code in an Excel VBA module that will run a Word
macro I have saved in a word document.

If the file containing the Word macro is "C:\netcap macros.doc", and the
Word macro is named "Sub PrintSLKFiles", what Excel VBA code would run this
macro.

Thanks in advance,

Alan
 
K

Kaak

Sub Test()

Dim WordApp As Object

Set WordApp = CreateObject("Word.Application")

LetterTemplate = "C:\TestDoc.doc"

With WordApp

.Documents.Open LetterTemplate
.Visible = True
.Run ("Macro1")

End With

WordApp.Quit

Set WordApp = Nothing

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top