Gossamer Forum
Home : General : Perl Programming :

Stupid Win32::OLE, or just me?

Quote Reply
Stupid Win32::OLE, or just me?
Hi,

I've got a script, which opens up a given word document, and then saves it as a "watermarked" version.

Now, this script works without a hitch on .doc files. However, we've installed the Word 6.0 convertor (to accomidate .wps files).

Now, the problem is when it comes to processing WPS file.

I have the following code;

Code:
my $Word = Win32::OLE->new('Word.Application', 'Quit') || die Win32::OLE->LastError();
$Word->{Visible} = 0 ; # 0 = Don't watch what happens
$Word->{DisplayAlerts} = 0 ; # 0 = do not prompt
my $doc = $Word->Documents->Open($path);

The problem is, that WPS files (when saved) are giving an error about "some of the features you requested are not availabled in this format". Does anyone know how I can filter these messages out?

I've taken a look directly in the Word (2002) settings, but can't see anything obvious on the "Save" tab.

**any** suggestions are much appreciated Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!