Hallo Leute,
ich stecke immer noch fest bei meinen Serienbriefen.
Folgender Code bringt immer den Fehler OBJECT VARIABLE NOT SET
Set WordDoc2 = object.Activate(True)
Und ich sehe wieder nicht warum.
Hat jemand eine Idee ?
Ciao
Don Pasquale
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim MergeDoc As NotesDocument
Dim MergeView As NotesView
Dim rtitem As NotesRichTextItem
Dim w As New NotesUIWorkspace
Dim WordDocs As Variant
Dim WordDoc As Variant
Dim WordDoc2 As Variant
Dim object As Variant
Dim WordObj As Variant
Dim i As Integer
Dim temp As String
Dim templateName As String
Set db = session.CurrentDatabase
Dim dlgDoc As New NotesDocument(db)
OK=False
OK=w.dialogbox("Reaktionsschreibenpicker", True, True, False, False, False, False, "Wählen Sie eine Vorlage",dlgDoc)
If OK Then
templateName=dlgDoc.templatechoices(0)
Set MergeView = db.GetView( "Reaktionsschreibenvorlagen" )
Set MergeDoc = MergeView.GetDocumentByKey(templateName,True)
Set rtitem = MergeDoc.GetFirstItem("Body")
Set object = rtitem.GetEmbeddedObject("Microsoft Word Document")
Set WordDoc2 = object.Activate(True) '******** OBJECT VARIABLE NOT SET
End If