You are here: Any ideas how to Run Macro in Microsoft Publisher through PHP COM ? « PHP Programming Language « IT news, forums, messages
Any ideas how to Run Macro in Microsoft Publisher through PHP COM ?

Posted by joe1977 on 01/26/07 07:28

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 :(

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация