Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: Notestime am 21.12.02 - 08:31:38

Titel: Aus ner View detachen
Beitrag von: Notestime am 21.12.02 - 08:31:38
Hallo Alle,

ich habe Dokumente, die Attachments enthalten. Ich möchte aus einer View per Aktionsbutton ALLE Anhänge der markierten Dokumente in einen definierten Pfad lösen.

Wie stelle ich das am besten an?

Bernd
Titel: Re:Aus ner View detachen
Beitrag von: Axel am 21.12.02 - 14:04:50
Hi,

versuch' s mal damit:


...
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim rtitem As Variant

'...set value of doc...

Set db = session.CurrentDatase
Set collection = db.UnprocessedDocuments

Set doc = collection.GetFirstDocument

While Not (doc is Nothing)
  Set rtitem = doc.GetFirstItem( "Body" )
  If ( rtitem.Type = RICHTEXT ) Then
    Forall o In rtitem.EmbeddedObjects
        'Dateien in Verzeichnis c:\reports lösen
        Call o.ExtractFile( "c:\reports\" & o.Name )
    End Forall
  End If

  Set doc = collection.GetNextDocument(doc)
Wend
...

Ich hab's nicht getestet, sollte aber so funktionieren.


Axel
Titel: Re:Aus ner View detachen
Beitrag von: Notestime am 21.12.02 - 14:53:39
Geil! Funktioniert!

Danke!!
Titel: Re:Aus ner View detachen
Beitrag von: Axel am 22.12.02 - 11:58:27
Hi,

setzt du bitte dann dein Posting auf "Erledigt". Danke.


Schöne Weihnachten

Axel