Solved

How To Run Word Macro From Powerbuilder

Posted on 2003-11-10
2
1,421 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
ID: 9720558
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

776 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