Re: Open e-mail attachment

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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

.



Relevant Pages

  • Re: Interpretation of extensions different from Unix/Linux?
    ... UTF-8 string. ... So by your definition these are "true" roots. ... Windows API, and it is the API functions which fail to ... rubbish has nothing to do with the file system. ...
    (comp.lang.ada)
  • Re: PRE-PEP: new Path class
    ... >>subclass of single byte or unicode strings, ... string class it should subclass. ... >>particular file system has in it's warped little mind. ... If the path object describes a directory, ...
    (comp.lang.python)
  • Re: Data from web site
    ... Thanks Tim, don't think I need to try that now:) ... >> I'm not clued up on HTML, but hopefully that is the name of the frame I ... >>> You can then parse out the info from the returned string. ... >>> Dim objShell As Object, objShellWindows As Object, o As Object ...
    (microsoft.public.excel.programming)
  • Re: cvs commit: src/sys/sys jail.h src/sys/kern kern_jail.c vfs_syscalls.c
    ... > I don't like this fix... ... > file system is mounted as a string. ... > where file system is mounted, instead of directory as a string. ... With such fix (vnode instead of string), ...
    (freebsd-arch)
  • Re: Catch-A-Call
    ... aka Kuay Tim ... Any higher value extends the time the modem waits ... > This string has two AT commands. ... In the Extra Settings box, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)