Hi, does anyone know
how to insert proper page breaks
using OLE? 

I am trying to insert a perl created report into a microsoft
word document to get the proper page
breaks, and then print the report. Any thoughts?


Here's the code that I am running:

use Win32::OLE;

my $File = "\\filename";

my $Doc = Win32::OLE->GetObject( $File ) ;

   $Doc->{Application}->{Visible} = 1;

my $Count = int( $Doc->lines()->{Count} );

my $StartingParagraph = $Doc->lines(1)->{Range}->{Start};
my $EndingParagraph = $Doc->lines($Count)->{Range}->{End};

my $Collection = $Doc->Range(
   {
        Start=> $StartingParagraph,
        End=> $EndingParagraph
   } );


$Collection->{Font}->{Size} = 8;
sleep (1);

$Collection->{Font}->{Bold} = 1;
sleep (1);

$Doc->save();
sleep (1);
regards,

John
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to