Das Script hier habe ich noch gefunden, damit soll man Anhänge direkt drucken können, habs aber (meine ich) nie benutzt.
Printing attachments with Notes is not very comfortable. You can do it with OLE but you need to know witch software to call.
This way enables you to print using the native software print function.
This function calls a win32 method : ShellExecute; it looks in the registry what soft is linked to the file to print.
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (Byval hwnd As Long, Byval lpszOp As String, _
Byval lpszFile As String, Byval lpszParams As String, Byval LpszDir As String, Byval FsShowCmd As Long) As Long
Declare Private Function GetDesktopWindow Lib "user32" () As Long
Private Const SW_HIDE = 0&
Sub PrintAttachment(doc As NotesDocument)
Dim rtItem As NotesRichTextItem
Dim Scr_hDC As Long
Dim ret As Long
Dim file As String
Set rtItem = doc.GetFirstItem("D_Body")
If Not rtItem Is Nothing Then
Forall o In rtItem.EmbeddedObjects
file = ReplaceSubString ( o.Name , " " , "_" )
Call o.ExtractFile( "c:\temp\" & file )
Scr_hDC = GetDesktopWindow()
ret = shellExecute(Scr_hDC, "print",file,Null ,"c:\temp" ,SW_HIDE)
If ret <= 32 Then
Msgbox "An error occurs while printing!"
End If
End Forall
End If
End Sub