Hallo zusammen,
ich habe leider ein Problem im 6er Client, im 5er funktionierts einwandfrei.
Ich bekomme in der Zeile Set embedded = doc.GetAttachment( item.values(0) )
immer die Meldung: Variant does not contain a container!
hat jemand eine Idee? danke schon mal...
Sub Initialize
Dim session As New notessession
Dim db As notesdatabase
Dim ws As New notesuiworkspace
Dim doc As notesdocument
Dim doc2 As notesuidocument
Dim dc As notesdocumentcollection
Dim rtitem As notesrichtextitem
Dim embedded As NotesEmbeddedObject
Dim item As Variant
Dim loopindex As Long
Dim poc As Integer
Dim resul As String
Dim xlapp As Variant
Set db = session.currentdatabase
Set dc = db.Unprocesseddocuments
For loopindex = 1 To dc.count
Set doc = dc.getnthdocument(loopindex)
Set doc2 = ws.editdocument(False,doc)
If (doc.hasitem("$File")) Then
Set item = doc.getfirstitem("$File")
Set embedded = doc.GetAttachment( item.values(0) )
fname = "C:\TEMP\" & item.values(0)
poc = Instr(1, fname, ".")
resul = Mid$(fname, poc, 4)
Call embedded.extractfile(fname)
'Print(resul)
If Lcase$(resul) = ".rtf" Then
'Print("------IN DOC")
Call doc2.print(1)
Dim wordapp As Variant
Dim worddoc As Variant
Set wordapp = createobject("Word.application")
Call wordapp.documents.open(fname)
Call wordapp.printout()
For i = 1 To 10000
Print i
Next
Call wordapp.quit
For i = 1 To 4000
Print i
Next
Else
Call doc2.print(1)
'Call doc2.close(True)
'Print("------ANDERER ANHANG")
End If
Kill fname
Else
Call doc2.print(1)
'Call doc2.close(True)
'Print("KEIN ANHANG")
End If
Print(" ")
doc.putinfolder("($Inbox)")
' doc.removefromfolder("($Inbox)")
Call doc2.close(True)
Next
End Sub