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
|