ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
Re: inserting text into word with OLE
by other posts by this author
Jan 28 2003 10:02PM messages near this date
view in the new Beta List Site
inserting text into word with OLE | RE: socket application
This may not be the best way but it works for me.

my $doc = $word ->  Documents -> Open("c:/test.doc");

my $oRange = $doc-> Range();
my $oRange-> EndOf;
my $oFont = $oRange-> {Font};
$oRange-> {Text} = "Hello";
$oFont-> {Color} = $clBlue;
$oRange-> {Text} .= "\nWorld";


-- 
Nathaniel G. Bartusiak
TTMS, Keesler AFB



>  I have been trying to figure out a way to insert text at the end of a
>  Word document.  I know you can insert with
> 
>  $word->Selection->TypeText("text here");
> 
>  but if I am correct I need to place the cursor at the end of the file in
>  order to insert there.  I have tried looking for the control to place
>  the text cursor at the end of the file but have been unsuccessful, does
>  anyone know how to do this or is there a better way to insert text at
>  the end of a file?
> 
>  Thanks in advance
>  Eric
>  _______________________________________________
>  Perl-Win32-Users mailing list
>  Perl-Win32-Users@[...].com
>  To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Hawley, Eric


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved