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

fishpoem has asked for the wisdom of the Perl Monks concerning the following question:

Question: how do I go to the END of a Word doc before CLOSE?

The code below simply appends one document to another. I would like to go to the very end of the destination document AFTER the text has been appended but BEFORE closing the destination document.

$Word->Documents->open( $source_doc ) or die "Unable to open $source_doc ", Win32::OLE->LastError(); my $text = $Word->ActiveDocument->Content->Text; $Word->ActiveDocument->Close; $Word->Documents->open( $dest_doc ) or die "Unable to open $dest_doc ", Win32::OLE->LastError(); $Word->ActiveDocument->Content->InsertAfter({ Text => $text }); $Word->ActiveDocument->Close;