use COM MS Publisher

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeroenhendriks2
Forum Newbie
Posts: 1
Joined: Wed Aug 28, 2002 6:46 am

use COM MS Publisher

Post by jeroenhendriks2 »

Does anyone know how I can get the properties (File / Properties) from a Microsoft Publisher file by using it's COM-objects?

And I want to save a Microsoft Publisher document as a text-document (.txt) by using it's COM-objects. I only can save it as a rtf-document.


I have already got this code working:

$instance = new com("publisher.application");
$instance->Open("C:\\xxx.pub");
$instance->ActiveWindow->Visible = 0;
$instance->ActiveDocument->SaveAs("C:\\test.txt", 6, 0); // dont work...
$instance->ActiveDocument->Close();
$instance->Quit();
$instance->Release();
$instance = null;
acidbox
Forum Newbie
Posts: 2
Joined: Fri Sep 06, 2002 5:05 pm

Post by acidbox »

once in publisher try this.

ALT+F11

then, F2
Post Reply