Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print the file ?
Message
De
30/11/2000 23:24:53
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00445540
Message ID:
00447858
Vues:
20
>>>>>Anyone know how to print the file (not doc file) programmatically or
>>>>>call API ? I try to use ShellExecute "print" before, but the file must be
>>>>>document file.The file i want to print is .log file.
>>>>>Can i call windows print manager ? or call notepad to print ?
>>>>
>>>>Easiest is to just call NotePad with the /PRINT command line parameter.
I would have thought
SET CONSOLE OFF
>>>LIST FILES LIKE c:\temp\*.log TO PRINTER   && or PROMPT
>>>SET CONSOLE ON
was easier. Just my opinion.
>>
>>LIST FILES only gives the directory; it doesn't print the files.
Found it:
TYPE FileName1
>  [AUTO]
>  [WRAP]
>  [TO PRINTER [PROMPT] | TO FILE FileName2]
>  [NUMBER]
...but then also look at the help for Set Heading, because this way of printing would also be affected by some formatting performed by Fox (note the Wrap clause - it's just a way to override the default formatting). You may find this useful for unformatted text files, but if any formatting is included (like, having form feeds, page numbers etc just like in character-mode-only days), you run a 99% chance that this internal formatting will collide with Fox's formatting, and... well, just walk to the printer and see what you got.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform