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...)