in reply to Re: Re: Access Visio in Perl
in thread Access Visio in Perl

Suppose you have a shape in test.vsd:
use strict; use warnings; use Win32::OLE; $Win32::OLE::Warn = 3; my $path = "D:\\FilePath\\"; my $file = "test.vsd"; my $Visio = Win32::OLE->new('Visio.Application', 'Quit'); my $VDocs = $Visio->Documents; my $VDoc = $VDocs->Open("$path$file"); my $VPage = $VDoc->Pages->Item(1); my $VShapes = $VPage->Shapes; my $VShape = $VShapes->Item(1); $VShape->{Text} = "Biggie Ole"; print $VShape->{Text}; $VDoc->SaveAs($path."test2.vsd");
Open Up the Shrinkwrap with OLE is a good (albeit old) article on Visio OLE (a 2MB PDF).

Replies are listed 'Best First'.
Re: Re: Re: Re: Access Visio in Perl
by n8234a (Initiate) on Aug 08, 2003 at 15:57 UTC
    Do you know how to assign values to "custom properties" of objects in Visio? I've tried $Object_Handle->{Prop.Module_Name} = ("$module_name"); No luck.