Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: Claudi am 20.08.04 - 19:00:59

Titel: Zugriff auf Attachment
Beitrag von: Claudi am 20.08.04 - 19:00:59
Hi,

ich hoffe, ihr könnt mir bei folgendem Problem helfen.

Ich möchte mit LotusSkript auf ein Powerpoint-Attachment, welches sich in einem Dokument befindet (welches in einer Ansicht ausgewählt wurde), zugreifen, die Folien dieses Attachments kopieren und diese in ein neues Powerpoint-Dokument kopieren.

Soweit hab ich's:

Dim ws As New NotesUIWorkspace   
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
   
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument
   
      
Dim rtitem As Variant
Dim handle As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
   If ( o.Type = EMBED_ATTACHMENT ) Then
      Set handle = o
     Call handle.Activate(True)                 End If
End Forall
End If

Dim PPT As Variant
Dim NewPresentation As Variant
   
'create PPT object, which launches the PPT application
Set PPT = CreateObject("PowerPoint.Application")
   
'set to visible so we can see what we're doing...
PPT.Visible = True
   
Set NewPresentation = PPT.Presentations
NewPresentation.Add


Problem: Mein Attachment wird nicht geöffnet - zumindest sehe ich es nicht. Kann ich trotzdem irgendwie die Folien kopieren und in meine neue Präsentation einfügen?


Wäre super, wenn mir jemand von euch Hilfe geben könnte!

Dankeschön!
Titel: Re:Zugriff auf Attachment
Beitrag von: TMC am 20.08.04 - 19:44:24
Ich weiß nicht, ob das so funktioniert.

Zum Launchen von Attachments nehme ich API und speichere das Dokument ins Windows-Tempverzeichnis.

Siehe hier, Antwort 13:
http://www.atnotes.de/index.php?board=7;action=display;threadid=16149

Das Windows-Temp-Verzeichnis hole ich mir so:
http://www.atnotes.de/index.php?board=9;action=display;threadid=14597;start=0
Titel: Re:Zugriff auf Attachment
Beitrag von: Claudi am 21.08.04 - 19:43:39
Vielen, vielen Dank!

Das hat mir wirklich sehr geholfen.
Titel: Re:Zugriff auf Attachment
Beitrag von: TMC am 21.08.04 - 20:18:46
Prima.

Setzt Du bitte den Thread noch auf (http://www.atnotes.de/YaBBImages/solve.gif)

Danke.