Solved

How To Run Word Macro From Powerbuilder

Posted on 2003-11-10
2
1,407 Views
Last Modified: 2013-12-26
1. how can i run any macro of word from powerbuilder

this line is not working ;

ole_1.run("MacroName:=Macro1")
                OR
ole_1.run("Macro1")

to run a macro i found this line in Word ;

Application.Run MacroName:=Macro1

2. Is there some way that a macro is run automatically; as soon as word document is opened, no other user interference should be required to run the macro
         OR
as soon as following line opens the word document

ole_3.documents.open("d:\Merge.doc")

thanks,
Rao.
0
Comment
Question by:shafiqrao
2 Comments
 

Accepted Solution

by:
shafiqrao earned 0 total points
Comment Utility
i figured it out my self here is teh solution

///////////////////////////////////////////////////////////////////
oleObject ole_3
ole_3 = CREATE OLEObject
ole_3.ConnectToNewObject("word.application")
ole_3.documents.open("d:\Merge.doc")
ole_3.run("Macro1")
//////////////////////////////////////////////////////////////////
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now