Guten Abend!
Ich würde gerne Word Dokumente, die in einem RTF-Feld eiens Lotus Notes Dokuments als Attachement abgelegt sind, öffnen und verändern. Konkret möchte ich die Word Dokumente öffnen, um per Suchen/Ersetzen einige Werte aus Lotus Notes einzufügen. Dann sollen die Word Dokumente im RTF-Feld des Lotus Notes Dokuments gespeichert werden.
Mit OLE kenne ich mich aus anderen Sprachen aus, aber ich komme in Lotus Notes gar nicht so weit bzw. nicht so wie ich möchte. Ich schaffe es nicht, die Word Dokumente zu öffnen.
Ich habe folgendes probiert:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim item As Variant
Dim object As NotesEmbeddedObject
Dim handle As Variant
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set item = doc.GetFirstItem( "body" )
Forall embobj In item.EmbeddedObjects
Messagebox "Name: " & embobj.Name
Set object = item.GetEmbeddedObject( "test.doc" )
Set handle = object.Activate( True )
If ( handle Is Nothing ) Then
Messagebox "This object has no OLE automation interface"
Else
Messagebox "This object has an OLE automation interface"
End If
End Forall
End Sub
Ich erhalte immer als Meldung "This object has no OLE automation interface", aber das kann doch irgendwie nicht richtig sein?? :-?
Nur Word per Lotus Skript zu starten fuktioniert zum Beispiel.
Auch per "item.ExtractFile" bekomme ich die Word Dokumente auf die Festplatte gespeichert. Aber dann sind sie ja nicht mehr im Lotus Notes Dokument, wo sie bitte drin bleiben sollen
Ich hoffe jemand hat einen Hinweis für mich.
Viele Grüße,
Peter Feiersinger