Domino 9 und frühere Versionen > Entwicklung

Object Variable not set

(1/4) > >>

bienmaja:
@all
Hi!

Hilfe! Komme hier mal wieder nicht weiter!

Ich mnöchte doch einfach nur das Dokument per Mail versenden. (Also nicht nur einen Verweis darauf!)
Ich habe auch in den Eigenschaften der Maske eingestellt, dass die Maske im Doc gespeichert wird.
Folgendendes Script habe ich als Aktion:

Sub Click(Source As Button)
     'Variablendeklaration
     Dim WS As New NotesUIWorkSpace
     Dim UiDoc As NotesUIDocument
     Dim Doc As NotesDocument
     Dim Speicher As Variant
     
     'Variableninitialisierung
     Set UIDoc = WS.CurrentDocument
     
     Call Doc.Send(True)
     
End Sub

Wenn ich dies aber ausführen lasse, dann sagt Notes mir Object Variable not set!

Wo ist mein Fehler???

Danke schon vorab für eure Hilfe!

Liebe Grüße,
Marion

harkpabst_meliantrop:
Du verschickst ein doc, das du noch gar nicht hast. Es fehlt ein

set doc = uidoc.Document


Oder gleich in einem Term

set doc = ws.CurrentDocument.Document

dann brauchst du die Variable uidoc gar nicht.

--E<:|

bienmaja:
Hi harkpabst_meliantrop!
Irgendwann werde ich das auch noch begreifen, das mit dem ganzen Deklarieren im Script...

Habe das ausprobiert, aber jetzt sagt Notes:

No Form associated with document

Was kann das jetzt schon wieder bedeuten?

Gruß, Marion

Rob Green:
hallo maja,

folgendes aus der Notes Help:

Call notesDocument.Send( attachForm [, recipients ] )

Parameters
attachForm
Boolean. If True, the form is stored and sent along with the document. If False, it isn't.
recipients
String or array of strings. Optional. The recipients of the document, which may include people, groups, or mail-in databases.
Usage
If you have only Reader access to a database, you can run a LotusScript agent that creates and sends a document, but the agent will not work if you attach a file to that document.
There are two kinds of items that can affect the mailing of the document when you use Send:
If the document contains additional recipient items, such as CopyTo or BlindCopyTo, Notes mails the documents to these recipients.
If the document contains items to control the routing of mail, such as DeliveryPriority, DeliveryReport, or ReturnReceipt, Notes uses these when sending the document.
Sending the form increases the size of the document, but insures that the recipient can see all of the items on the document.

Also ein (true) noch dazu und das wars.
doc.send(true)

wenn nix, dann mußt du selbst alles machen, wie etwa die Form bestimmen vor dem senden:
doc.form="Memo"...

bienmaja:
@rob_green

Das mit dem doc.send(true) habe ich ja...
Nur dass da eben die Fehlermeldungen kommen...

Verstehe nur nicht, warum Notes meint, dass keine Maske eingebunden ist...
Das habe ich  zumindest aktiviert...

Und was meinst du mit:

quote]wenn nix, dann mußt du selbst alles machen, wie etwa die Form bestimmen vor dem senden:
doc.form="Memo"...[/quote]

Was muss ich in die Aktion noch ein Set doc.form=Ankündigung hinzufüge, dann sagt Notes mir Types Mismatch...

Aber irgendwie muss es ja gehen, denn wenn ich das von Notes vorgegebene Senden nehme, dann wird das Doc mitgesendet...

Liebe Grüße, Marion

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln