http://qs321.pair.com?node_id=124180


in reply to MSWord OLE, font and saveas Problems

You were so close. When writing to a property of an object with perl, you have to enclose the property name with {}.
# $ins_range->Font->Name = "Arial" gives illegal lvalue # turns into $ins_range->Font->{Name} = "Arial";
Since you're using OLE, you'll be working with objects a lot. Always remember that properties are enclosed in curly braces.

As for your other problem, without knowing what you are trying to saveas, I really can't help you out.

P.S. msdn.microsoft.com is the best place to find information on the OLE interface. If you want the examples in perl, just change all the '.'s to '->', put '{}' around the properties, change 'Dim' to 'my', and add a '$' in front of the variables ;^)

Replies are listed 'Best First'.
Re: Re: MSWord OLE, font and saveas Problems
by traveler (Parson) on Nov 09, 2001 at 01:29 UTC
    Many thanks! I'd missed the {} around properties part! I had figured out the rest of the conversion stuff.

    As for your other problem, without knowing what you are trying to saveas, I really can't help you out.

    Well, I copied the code directly from my app so maybe I'm missing something if you cannot figure out what I'm trying to saveas, niether can Word, probably. Am I missing something?

    Thanks! --traveler