Urgent help needed please

S

sriram

Set objword = New Word.Application
Set objDoc = objword.Documents.Open(DocumentPath +
"\ECB_Document.doc")
objword.Visible = True
objword.Activate
objword.Run ("FillinDocument")

objDoc.Close _
SaveChanges:=Word.WdSaveOptions.wdSaveChanges
objword.Quit
Set objword = Nothing


I am trying to call a word macro from excel(office 2003) it keeps on
giving me errors.. can any one help
 
J

johnmanivong

 Set objword = New Word.Application
   Set objDoc = objword.Documents.Open(DocumentPath +
"\ECB_Document.doc")
  objword.Visible = True
  objword.Activate
  objword.Run ("FillinDocument")

  objDoc.Close _
           SaveChanges:=Word.WdSaveOptions.wdSaveChanges
  objword.Quit
  Set objword = Nothing

I am trying to call a word macro from excel(office 2003) it keeps on
giving me errors.. can any one help

I think you have to state the workwook name, module name and macro
name
for example objwor.Run "Normal.NewMacros.FillinDocument"
 

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