Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Win 32 Ole, Word Automation

Thread Tools

Win 32 Ole, Word Automation

Peter Wilson
Posts: n/a

Im having problems putting pictures into my word document. I can get
pictures in but they all appear ontop of each other as oppose to where the
cursor is, I am also inserting a line on each page as well and that appears
at the wrong place as well. So I guess im doing something fundamentally
wrong. Can anyone tell me what im doing wrong or how to move the picture
onto each page, this is a small section of a larger document so I would like
to have lots of flexibility this is why have decided not to use a mail

Any help would be greatly appreciated.



my $Word = Win32::OLE->new('Word.Application', 'Quit');
$Word->{'Visible'} = 1;

my $doc = $Word->Documents->Add;

$doc->PageSetup->{Orientation} = wdOrientLandscape;
$doc->PageSetup->{TopMargin} = 0;
$doc->PageSetup->{BottomMargin} = 0;
$doc->PageSetup->{LeftMargin} = 0;
$doc->PageSetup->{RightMargin} = 0;

$thisdoc = $Word->ActiveDocument;

$cgm_image = $thisdoc->Shapes->AddPicture(

False, True, 0, 0, 778.1, 553.05);

$cgm_image->{Left} = wdShapeCenter;

$line = $doc->Shapes->AddLine(44,540,803,540);
$line->{'Line'}->{Weight} = 10;


$cgm_image1 = $thisdoc->Shapes->AddPicture(

False, True, 0, 800, 778.1, 553.05);

$cgm_image1->{Left} = wdShapeCenter;

$line = $doc->Shapes->AddLine(44,540,803,540);
$line->{'Line'}->{Weight} = 10;


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applet to run on Win 98, Win ME, Win XP, Win Vista & Win 7 ?? Krist Java 6 05-06-2010 11:53 PM
Supressing the ctrl-c and other keys during word automation in automation apondu ASP .Net 0 07-19-2007 09:10 PM
OLE Automation: question about Word SaveAs Greg Howard Perl 1 07-02-2004 04:30 PM
Word automation Aleks Microsoft Certification 1 06-10-2004 07:04 PM
Modifying a Word document without using Word Automation Michael G. Schneider ASP General 5 12-16-2003 06:52 PM