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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running one macro inside another

Status
Not open for further replies.

kawnz

Technical User
Jan 30, 2003
67
US
I was able to run one macro inside another last night in Word 2000, but it doesn't seem to be working in Word 97. How can I run one macro inside another in Word 97?

The code I used last night was:
Code:
Sub generate_new_form()
    Application.Run MacroName:="ToolsProtectUnprotectDocument"
    Application.Run MacroName:="create_new_form"
    Application.Run MacroName:="ProtectForm"
 
End Sub

It works in 2000, but not in 97. Help?
 
Thanks :)
I will try that.

I was able to get it working by just removing everything, and just typing
Code:
ToolsProtectUnprotectDocument
create_new_form
ProtectForm
without using any other code.
 
You don't need to use 'Call' (though I must admit I would), but many do, as what it does is to clearly mark out that you are calling another routine from within that one. It's no different really to commenting your code, and just helps to make things easy to debug.

Regards
Ken..............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top