Hallo Zusammen
Ich habe folgendes Problem. Würde gerne Bilder aus einem vordefinierten Pfad in diverse Notes Richtextfelder attachen.
Die Bilder werden wohl ins Dokument geschrieben jedoch nur in $FILE Felder. Kann man das umgehen.
Dim ses As New NotesSession
Dim uiw As New NotesUIWorkspace
Dim uid As NotesUIDocument
Dim ndb As NotesDatabase
Dim docCurrent As NotesDocument
Dim fileNameBig As String
Dim fileNameSmall As String
Dim rtitemBig As NotesRichTextItem
Dim rtitemSmall As NotesRichTextItem
Dim pathNameBig As String
Dim pathNameSmall As String
Dim pathNameBigEmb As String
Dim pathNameSmallEmb As String
Dim i As Integer
Dim FileNumber As String
Dim FileNumberSmall As String
Set uid = uiw.CurrentDocument
Set docCurrent = uid.Document
pathNameBig$ = "c:\Restwertzentrale\original\*.*"
pathNameBigEmb$ = "c:\Restwertzentrale\original\"
pathNameSmall$ = "c:\Restwertzentrale\thumbs\*.*"
pathNameSmallEmb$ = "c:\Restwertzentrale\thumbs\"
fileNameBig$ = Dir$(pathNameBig$, 0)
i = 0
Do While fileNameBig$ <> ""
i = i + 1
If i <= 15 Then
Set rtitemBig = docCurrent.GetFirstItem( "ImageB" & i )
If ( rtitemBig.Type = RICHTEXT ) Then
FileNumber$ = NotesLeft(fileNameBig$, "-", False)
Call rtitemBig.EmbedObject( EMBED_ATTACHMENT, "", pathNameBigEmb$ & fileNameBig$)
Kill pathNameBigEmb$ & fileNameBig$
fileNameSmall$ = Dir$(pathNameSmall$, 0)
Do While fileNameSmall$ <> ""
FileNumberSmall$ = NotesRight(NotesLeft(fileNameSmall$, "-", False), "_", True)
If FileNumber$ = FileNumberSmall$ Then
Set rtitemSmall = docCurrent.GetFirstItem( "ImageS" & i )
If ( rtitemSmall.Type = RICHTEXT ) Then
Call rtitemSmall.EmbedObject( EMBED_ATTACHMENT, "", pathNameSmallEmb$ & fileNameSmall$)
Kill pathNameSmallEmb$ & fileNameSmall$
Exit Do
End If
End If
fileNameSmall$ = Dir$()
Loop
End If
End If
fileNameBig$ = Dir$(pathNameBig$, 0)
Loop
Call docCurrent.Save(True, True)
Bin für jede Hilfe dankbar.
Gruss
Stéphanie