ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Urgent help needed please (https://www.excelbanter.com/excel-programming/408180-urgent-help-needed-please.html)

sriram

Urgent help needed please
 
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

[email protected]

Urgent help needed please
 
On Mar 22, 10:31*pm, sriram wrote:
*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"


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com