Domino 9 und frühere Versionen > Administration & Userprobleme
Anhänge lösen mit Pfadspeicherung
(1/1)
Michael69:
Hallo,
wie kann man aus einem mail einen Anhang lösen und den Pfad im mail angezeigt bekommen? Somit liesse sich auch im nachhinein nachvollziehen wo der Anhang geblieben ist...
Soll sozusagen z.B. wie folgt aussehen:
<C:Projekte/Anhang/Daten.exe>
Vielen Dank für Tips einen neuen Notes user...
Michael
Don Pasquale:
ich glaube, ich hab das mal in script so gelöst.
Aber wie das dann in der Mail angezeigt wird ?
dim reaktionsbriefpfad As String
reaktionsbriefpfad = "C:\tempdir"
Dim MergeDoc As NotesDocument
Dim rtitem As NotesRichTextItem
If MergeDoc.HasEmbedded Then
Set rtitem = Mergedoc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_Attachment ) Then
PFAD$ = Reaktionsbriefpfad & "\" & o.name
Call o.ExtractFile ( PFAD$ ) 'Anhang auf Laufwerk "Pfad" speichern
End If
End Forall
End If
End If
Ciao
Don Pasquale
sloe:
Hi,
hier mit Vermerk im Memo:
--- Code: ---%REM
Dieser Agent stammt von der Website http://www.martinscott.com/HomePage.nsf/pages/LibraryFrame
Sloe
erstellt am: 9.10.2001
%END REM
Dim S As New NotesSession
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim db As NotesDatabase
Set db = S.currentDatabase
Set collection = db.UnprocessedDocuments
If (collection.Count = 0) Then
Messagebox("No documents selected.")
Exit Sub
End If
Set doc = collection.GetFirstDocument()
Dim totalsize As Long
Dim count As Long
Dim rtitem As NotesRichTextItem
Do While Not(doc Is Nothing)
If (doc.HasEmbedded) Then
Set rtitem = doc.GetFirstItem("Body") '...grab a handle to the Body field so we can log our removal of file attachments
Forall o In rtitem.EmbeddedObjects
count = count + 1 '...increase the file attachment counter
totalsize = totalsize + o.filesize '...increase the total size counter
Call rtitem.AppendText("File " & o.Source & " was removed on " & Str$(Today) ) '...log removal of the file
Call rtitem.AddNewLine(1) '... add a new line
Call o.Remove() '...finally remove the file attachment
End Forall
End If
Call doc.save(True, True) '...commit our changes to the current doc
Set doc = collection.GetNextDocument(doc) ' get the next document
Loop
used = db.PercentUsed
If (used < 85) Then
warning = " You should probably compact this database."
End If
Messagebox(Str$(count) & " document(s) were removed, totaling " & Str$(totalsize) & " bytes. " & Str$(used) & "% of this database is now used." & warning)
--- Ende Code ---
Gruß
sloe
Performance:
@sloe
das sieht ja fast so wie das interne template der IBM aus. tse, tse - hatte wohl die usage nicht gelesen ???
cu
sloe:
@Performance
usage?
sloe
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln