Urgent help needed please

  • Thread starter Thread starter sriram
  • Start date Start date
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
 
 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"
 
Back
Top