473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Any ideas how to Run Macro in Microsoft Publisher through PHP COM ?

my macro in Publisher changes "123" into "321" (example)
but I can't be able to run it.
This is how far I get throught with PHP & Publisher:

<?
$pub = new COM('publisher.application') or die('Unable to load
Publisher');
print "Loaded Publisher, version {$word->Version}\n";

$pub->Open('xxx.pub');

$pub->Documents[1]->SaveAs('xxx2.pub');

$pub = null;

?>

this works, but of course does not do anything else than open xxx.pub
and save it as xxx2.pub. I am trying to run my macro:

$pub->Documents[1]->RunMacro(replaceme);

where replaceme is my macro. I tried different variations:

$pub->Documents[1]->Run(replaceme);
$pub->Documents[1]->Application->Run(replaceme),

etc but no luck so far :(

Jan 26 '07 #1
0 1802

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chango V. | last post by:
Hello, We seem to need a PIA for MSXML 4. According to the documentation, only the original publisher of a COM type library is supposed to create a .NET PIA. As far as I know, Microsoft hasn't...
1
by: Seb LM | last post by:
Hello, I'd like to define a publisher policy which covers many versions of assembly from which the "major.minor version" are different but it's not possible to make a such publisher policy. So...
5
by: Piotrek Stachowicz | last post by:
Hi, Sorry, it's gonna be a bit off-topic but I'm looking for experienced ..NET (c#) developers and I guess there're quite many here. I'm looking for a topic for my final year project (B.sc). It...
2
by: Brent Burkart | last post by:
I want to programatically create a Microsoft Publisher document using .NET. Has anyone tried this or seen any tutorials? Any help is appreciated. Thanks, Brent
0
by: Rich | last post by:
Hello, I have a simple console app for deploying an MS Access app. Recently, I started having a problem publishing the app to my webserver with the publisher feature of VS2005 when I do an...
0
by: Ron | last post by:
Hi All, I am fairly new to MS SQL Replication. I have two servers one is setup as the publisher and the other is setup as both the subscriber and the distributor. Due to server reboots, the...
0
by: =?Utf-8?B?TWFyayBX?= | last post by:
I have just upgraded Visual Studio from 2003 to 2005 and am in the process of converting my VB applications. Most conversions have gone quite smoothly. However, I have several Add-Ins that I...
1
by: eashoor | last post by:
Hi All, I am a newbie and need help. I am creating a data capture website using microsoft publisher 2003. everything is lovely except 2 things, after uploading my site to my host 1- My...
1
by: mclewell | last post by:
I would like to start off by saying i'm in no way an expert by any means. I've had access since 97 and way back then set up a database for eBay stock. i had the old micrografx picture publisher...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.