Domino 9 und frühere Versionen > Entwicklung

Problem mit CreateObject

(1/6) > >>

robertpp:
Hallo,
Ich möchte einen Agent erstellen der mir ein Doc versendet. Mein jetztiger Stand ist:




   Dim s As New NotesSession
   Dim db As NotesDatabase
   Dim uiws As New NotesUIWorkspace
   Dim uidoc As NotesUIDocument
   Dim doc As NotesDocument
   Dim rtfBody As NotesRichTextItem   
   Dim fpath(0) As Variant   
   
   Set db= s.CurrentDatabase
   Set doc = New NotesDocument(db)
   Set uidoc = uiws.CurrentDocument   
   
   If uidoc.FieldGetText( "Subject" ) = "Umsatz Weikersdorf" Then
      
      doc.Form = "Memo"
      doc.SendTo = "Robert Prinz\MISEBG"
      doc.Subject = "Umsatz Weikersdorf"
      Set rtfBody = doc.CreateRichTextItem( "Body" )
      fpath(0) = "C:\mappe2.xls"
      uidoc.gotofield("Body")
       Call uidoc.CreateObject("Body", "", fpath(0))
      Call doc.Save(True, False)
      Call doc.Send( True )
      Call doc.Remove(True)
      Exit Sub      
   End If
   
Mein Problem liegt aber bei den Fettgedruckten Zeilen!!!
Wie kann ich CreateObject hier ausführen?
Dieser Befehl geht ja nur bei uidoc's aber ich sprech das ganze ja mit doc an!!!!!
gotofield macht ebenfalls probleme!!!

Bitte um Hilfe

robertpp

robertpp:
Das Problem bei dieser Sache ist:
Wenn ich es nach meiner Variante mache:

Call uidoc.CreateObject("Body", "", fpath(0))
(Das ich in einer anderen DB verwende) dann wird das Excelfile als geöffnetes File eingefügt und genau das brauch ich!!!

robertpp

klaussal:
... da muss ich leider passen   :'(

forrest g:
hi robert,

setz mal folgende zeile oben rein:
set uidoc = ws.editdocument(true, doc)

tschö

robertpp:
Ich hab das jetzt eingefügt unter:


Dim s As New NotesSession
   Dim db As NotesDatabase
   Dim uiws As New NotesUIWorkspace
   Dim uidoc As NotesUIDocument
   Dim doc As NotesDocument
   Dim rtfBody As NotesRichTextItem  
   Dim fpath(0) As Variant  
   
   Set db= s.CurrentDatabase
   Set doc = New NotesDocument(db)
   Set uidoc = uiws.CurrentDocument  
   
   If uidoc.FieldGetText( "Subject" ) = "Umsatz Weikersdorf" Then
      set uidoc = ws.editdocument(true, doc)
      doc.Form = "Memo"
      doc.SendTo = "Robert Prinz\MISEBG"
      doc.Subject = "Umsatz Weikersdorf"
      Set rtfBody = doc.CreateRichTextItem( "Body" )
      fpath(0) = "C:\mappe2.xls"
      uidoc.gotofield("Body")
       Call uidoc.CreateObject("Body", "", fpath(0))
      Call doc.Save(True, False)
      Call doc.Send( True )
      Call doc.Remove(True)
      Exit Sub      
   End If

ich bekomm jetzt ein mail aber da fehlt der offene anhang!!!
Was macht der befehl genau?

Ich glaub es ist aber trotzdem der richtige ansatz!!
nur er sendet mir jetzt nicht das doc mit anhang weil das sehe ich dann noch immer ab bildschirm sondern er sendet mir ein neu erstelltes doc wo nix drinnen steht!!!
robertpp

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln