Click to See Complete Forum and Search --> : RichTextBox Print


I. Lacosta
September 27th, 2001, 07:23 AM
Hi,
I want to print an RTF doc to a file through a PostScript printer driver:
1.- How can I print to any printer?
2.- How can I pass the name of file if the it prints to a file ?

Thanks,

I. Lacosta

Iouri
September 27th, 2001, 08:52 AM
That will print any file

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Dim lngResult As Long
lngResult = ShellExecute(Me.hwnd,"Print",strFile,0&,0&,vbMinimized)

where strFile is the full path to your file





Iouri Boutchkine
iouri@hotsheet.com