[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How To Run Word Macro From Powerbuilder

Posted on 2003-11-10
2
Medium Priority
?
1,539 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
1 Comment
 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

834 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