Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Generating RTF Documents

by mincus (Chaplain)
on May 05, 2001 at 18:49 UTC ( #78232=note: print w/replies, xml ) Need Help??


in reply to Generating RTF Documents

Here is the code to take a simple text file and insert it into a word document...
use Win32::OLE; $App = Win32::OLE->new('Word.Application'); $App->{Visible} = 1; $document=$App->Documents->Add; open (FILE, "text.txt"); @data=<FILE>; foreach (@data) { $App->Selection->TypeText($_); } $document->{Saved}=0; $App->Quit; $document=0; $App=0;
hope that gives you a start. Good luck!


.mincus
telnet://bbs.mincus.com

Replies are listed 'Best First'.
Re: Re: Generating RTF Documents
by mpolo (Chaplain) on May 05, 2001 at 20:09 UTC
    Thank you!

    Not exactly an answer to the original question, but a better solution than I was contemplating! (Except that eventually the program will be living on an NT server that -- I fear -- lacks Word. But that's a minor problem...)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://78232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2021-09-26 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?