hi,
i would like to know, if i did some programming on perl program. and i printed it out in html form. so if user typed into the input which is the textbox in html form, the result will be printed out in a pop-up notepad, ready for printing.
how do i make the pop-up notepad with the result in it?
Just label the file as ".txt". Most Windows computer have this set to open with Notepad. Is this what you mean?
eh... as in the result which the user want can be put into a pop-up notepad.
Only windows users will have notepad anyway. What you are trying to do is very impractical. Don't try and complicate a simple process: copy and paste. Plus, for all I know, it is not possible anyway.The webserver script can't open a local application, you would have to use an activeX control or maybe javascript.
if you need it to print, then just send whatever you need to print to a pop up window, and give it a print button...
im sorry, i misunderstood, disregard.
use Win32::OLE;
my $wrd = CreateObject Win32::OLE "Word.Application" or die $1;
$wrd->{'Visible'} = 1;
# Lets image that @Array contains the text you want to throw into a word document.
my $ToDoc = $wrd->Documents->Add;
$selection = $wrd->Selection();
foreach $line (@Array){
$self->TypeLine($wrdObj, $selection, $line);
}
$ToDoc->SaveAs($destFile);
$ToDoc->Close();
# You could also do some formatting, auto open the print window, auto print the document etc.... with:
$wrd->Run("Module1.newMacros.PrintIt");
# Note, you must first record the macro.
# That should get you started.
Sorry, Pulled that code from two files, replace '$self' with $wrd.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks