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!

Running a Macro in Word

Status
Not open for further replies.

zonetrap

Technical User
Jun 13, 2001
8
US
I'm trying to run a macro in Word through Paradox. I can get Word open and the file I want opened, but I'm not sure about the macro. I have created a macro, and it saved in NORMAL.DOT, but I'm not sure ho wot recall it and run it. Any help out there?
Thanks in advance.

method pushButton(var eventInfo Event)
var
service, topic, item String
DDELink DDE
goodlink Logical
EndVar

service = "C:\\Program Files\\Microsoft Office\\Office\\WINWORD.EXE"

topic = "C:\\Windows\\Desktop\\10031a.rpt"

goodlink = DDELink.open(service, topic, item)
sleep (2000)
DDElink.close()
endMethod
 
You would need to include the macro name in the command line when you start Word. Check the Word help files for the exact syntax.

Mac
:)
 
method pushButton(var eventInfo Event)
execute("start winword Normal.NewMacros.gig10031")
endmethod

This opens up Word, but the macro part won't run. I'm pretty sure this is the code, I got it from antoher website. The problem is that word is looking for a .doc extension, rather than running the code. If anyone can help, that would be great.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top