Running a Word macro from Excel problem

P

PaulC

I am trying to run a Word macro from Excel. The Macro, called
DocumentSave1 is saved in the ThisDocument folder of the WrapUpTemplate
file (see code). The relevant part of the code is:

Dim wdApp as Word.Application

Set wdApp = CreateObject("word.application")

wdApp.Documents _
..Open("P:\Spreadsheet Project\WrapUp\" & WrapUpTemplate) _
..Application.Visible = True

wdApp.Activate
With wdApp

....various word coding to copy text into template (this all works
fine)

DocumentSave1

End with

I just don't know how to get it to go to the Word macro. I have tried
moving DocumentSave1 to the Modules folder, but that does not seem to
work either.

Any help with this would be very gratefully received,

Paul
 
P

PaulC

Martin

Many thanks. I found it worked with just one period in front of Run:

..Run "DocumentSave1"

Thanks again,

Paul
 

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