Domino 9 und frühere Versionen > ND6: Entwicklung

Formel in Skript umwandeln

<< < (3/5) > >>

judicious:
Immer noch nicht  ???




--- Code: ---Dim uiws As New notesuiworkspace
Dim ses As New NotesSession
Dim ndbCurrentDB As NotesDatabase
Dim docMailDocument As NotesDocument
Dim rtBody As NotesRichTextItem
Dim nSendto As NotesName

Dim v_username As String
Dim blindCopyTo As String

v_username = source.fieldgettext("v_username")

Set ndbCurrentDB = ses.CurrentDatabase
Set docMailDocument = New NotesDocument( ndbCurrentDB )
Set rtBody = docMailDocument.CreateRichTextItem( "Body" )
Set nSendto = ses.CreateName(sSendto)

'Set Fields for the Mail
docMailDocument.SendTo = v_username
docMailDocument.Subject = "Your Email request"

Set  docRequestDoc = source.document

'Set Body Field for the Mail
Call rtBody.AppendText( "Guten Tag" )
Call rtBody.AddNewLine( 2 )

Call rtBody.AppendText( sMailtext )
Call rtBody.AddNewLine( 1)
Call rtBody.AppendDocLink( docRequestdoc, "Zum Antrag gehen")
Call rtBody.AppendText( " - Link zum Dokument" )
Call rtBody.AddNewLine( 2)

Call rtBody.AppendText( "Mit freundlichen Grüssen" )
Call rtBody.AddNewLine( 2 )
Call rtBody.AppendText(sOriginator )

'Send the Mail
Call docMailDocument.Send( False )
--- Ende Code ---

it898ur:
Woher kommt sSendTo  (für Notesname) ?

Glombi:
Mein Vorschlag:

Dim uiws As New notesuiworkspace
      Dim ses As New NotesSession
      Dim ndbCurrentDB As NotesDatabase
      Dim docMailDocument As NotesDocument
      Dim rtBody As NotesRichTextItem      
      Dim v_username As String
      
      v_username = source.fieldgettext("v_username")
      
      Set ndbCurrentDB = ses.CurrentDatabase
      Set  docRequestDoc = Source.document

      Set docMailDocument = ndbCurrentDB.CreateDocument
         
   'Set Fields for the Mail
docMailDocument.Form = "Memo"
      docMailDocument.SendTo = v_username
      docMailDocument.Subject = "Your Email request"
      
      
   'Set Body Field for the Mail
      Set rtBody = New NotesRichTextItem( docMailDocument, "Body" )

      Call rtBody.AppendText( "Guten Tag" )
      Call rtBody.AddNewLine( 2 )
      
      Call rtBody.AppendText( sMailtext )
      Call rtBody.AddNewLine( 1)
      Call rtBody.AppendDocLink( docRequestdoc, "Zum Antrag gehen")
      Call rtBody.AppendText( " - Link zum Dokument" )
      Call rtBody.AddNewLine( 2)
      
      Call rtBody.AppendText( "Mit freundlichen Grüssen" )
      Call rtBody.AddNewLine( 2 )
      Call rtBody.AppendText(sOriginator )
      
   'Send the Mail
      Call docMailDocument.Send( False )

judicious:
Hmmm..... Jetzt motzt Notes es hätte kein Default View für meine Datenbank

Glombi:
Dann gib Notes doch eine  ;D

Die brauchst Du für den Doklink. Ohne geht es nicht, auch nicht mit der Formelsprache.

Andreas

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln