Solved

How To Run Word Macro From Powerbuilder

Posted on 2003-11-10
2
1,412 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to download a folder from remote to local directory with Notepad++? 10 83
Eclipse for PHP 1 96
Java eclipse error 2 66
egit plugin on eclipse 8 41
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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

861 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

21 Experts available now in Live!

Get 1:1 Help Now