Domino 9 und frühere Versionen > ND6: Entwicklung

RenderToRTItem

<< < (2/2)

Axel:

--- Zitat von: reraru am 24.10.05 - 14:20:15 ---Ich müsste also eine Möglichkeit schaffen nach dem Klick auf den besagten Button: erstmal den zugehörigen EDV-Auftrag zu wählen. Am besten über eine Ansicht.

Wie wär das machbar?

--- Ende Zitat ---

Schau dir in der Designer-Hilfe mal die Methode PickListCollection aus der NotesUIWorkspace-Klasse an. Damit kannst du das realisieren.


Axel

reraru:
Hi!

So ich habe mit jetzt mal eine Lösung gebastelt die funktioniert:


--- Code: ---Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitem As NotesRichTextItem
Dim success As Variant
Dim collection As NotesDocumentCollection
Dim docColl As NotesDocument

Set db = session.GetDatabase("domino", "Entwicklung\IT.nsf")
Set uidoc = workspace.CurrentDocument
Set docA = uidoc.Document
If Not(db.IsOpen) Then Call db.Open("", "")

strView = "lkp_auftraege"
strServer = "domino"
strDBName = "Entwicklung\IT.nsf"

Set collection = workspace.PickListCollection( PICKLIST_CUSTOM, True, strServer, strDBName, strView, "Auswahl des EDV Auftrages", "Bitte wählen Sie den zugehörigen Auftrag aus:")

If collection Is Nothing Then
Msgbox "Abbruch"
Else

Set docColl = collection.GetFirstDocument
If docColl Is Nothing Then
Exit Sub
Else
Do While Not docColl Is Nothing

Set docB = New NotesDocument( db )
Call docB.MakeResponse(docColl)
Call docB.Save( True, True )
docB.mail_thema = docA.Subject
docB.doctype = "mail"
Set rtitem = New NotesRichTextItem( docB, "mail_body" )
docB.Form = "edv_mail"

Call docB.Save( True, True )
success = docA.RenderToRTItem( rtitem )
Call docB.Save( True, True )
Set docColl = collection.getNextDocument (docColl)
Loop


End If
End If

End Sub

--- Ende Code ---

Ich habe hier mal den Code aus 2 Beiträgen im Forum genutzt.

Vielen Dank Euch allen.

Gruß René

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln