Re: Open e-mail attachment
- From: "Michael Bauer" <mib00@xxxxxxxxxxx>
- Date: Fri, 17 Jun 2005 08:45:49 +0200
Tim, first you need to save the attchment to the file system. Then you
can use a Win32 API for printing. Sample:
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
Const SW_HIDE = 0
Public Function PrintFile(sFile As String, _
Optional lHwnd As Long _
) As Boolean
PrintFile = CBool(ShellExecute(lHwnd, "print", sFile, vbNullString,
vbNullString, SW_HIDE))
End Function
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
"Tim" <Tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7E362F1A-C947-479F-822C-FD8732138DCF@xxxxxxxxxxxxxxxx
> Is there a way to have outlook open a word attachment, print the file,
then
> close?
>
> Any help is greatly appreciated.
>
> Thx again.
>
> Tim
.
- References:
- Open e-mail attachment
- From: Tim
- Open e-mail attachment
- Prev by Date: Re: Synchronize
- Next by Date: Re: Printing via Word fails
- Previous by thread: Open e-mail attachment
- Next by thread: Programatically Changing the Outlook 2003 Cache Size
- Index(es):
Relevant Pages
|