Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to compile or convert my excel and word macros

Status
Not open for further replies.

yesilkalem

IS-IT--Management
Aug 4, 2001
26
0
0
TR
I have some word and excel macros in vba. and I want to run it without opening word also I want to compile it and an independent program in order to commit my txt files. how can I do?

thanks
 
hi,

from Project>References select "Microsoft Word 8.0 Library"
then

Dim objWrd as Word.Application

Set objWrd = CreateObject("Word.Application")
objWrd.Documents.Open("c:\test.doc")
' By default the application is not visible
'to make it visible use ->
objWrd.Application.Visible = True

.... then start using the VBA code but with the reference of your Object i.e "objWrd"

Hope this helps els write back....

[cheers]
Niraj [noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top