Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Win32::OLE Word Macro Conversion

by Jenda (Abbot)
on Nov 25, 2004 at 00:46 UTC ( [id://410296]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::OLE Word Macro Conversion
in thread Win32::OLE Word Macro Conversion

Right. And to "emulate" the with object statement you could do something like this:

for ($Word->Options) { $_->{LocalNetworkFile}=0; $_->{LabelSmartTags}=0; }
or
{ my %opt = ( LocalNetworkFile => 0, AllowFastSave => 1, BackgroundSave => 1, CreateBackup => 0, SavePropertiesPrompt => 0, SaveInterval => 10, SaveNormalPrompt => 0, DisableFeaturesbyDefault => 0, ); map $Word->Options->{$_} => $opt{$_}, keys %opt; }

Jenda
We'd like to help you learn to help yourself
Look around you, all you see are sympathetic eyes
Stroll around the grounds until you feel at home
   -- P. Simon in Mrs. Robinson

Replies are listed 'Best First'.
Re^3: Win32::OLE Word Macro Conversion
by offspinner (Initiate) on Dec 01, 2004 at 12:18 UTC
    That's Just Dandy. Thanks again!

      Actually it can be even neater. Win32::OLE provides a function with() that would let you do this:

      use Win32::OLE qw(with); ... with($Word->Options, LocalNetworkFile => 0, AllowFastSave => 1, BackgroundSave => 1, CreateBackup => 0, SavePropertiesPrompt => 0, SaveInterval => 10, SaveNormalPrompt => 0, DisableFeaturesbyDefault => 0, );
      I forgot about it when writing that node.

      Jenda
      We'd like to help you learn to help yourself
      Look around you, all you see are sympathetic eyes
      Stroll around the grounds until you feel at home
         -- P. Simon in Mrs. Robinson

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://410296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-29 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found