Sending the current document and a doclink

I’m trying to send the current open document (or a copy of it) and include a doclink to the document. The document should be sent without having it first open as a memo in my mail database.

I’d appreciate any suggestions on how to do this.

Thanks.

Subject: Give this a try…

Use in an action button on the form or in the querysave event with ToolsRunBackground agent.

subject := “subject goes here”;

msge :=“And you can add a message here…”;

@If(somefieldontheform != “”;

@MailSend(personyouwanttosendto;“”;“”;subject;msge +" " + Link);“”)

Subject: RE: Give this a try…

If you’re going that route, you probably want ToosRunMacro, not ToolsRunBackgroundMacros. But you don’t need an agent at all; you can just call @MailSend in the QuerySave.

Subject: Sending the current document and a doclink

Look at @MailSend for formula, or NotesRichTextItem.AppendDocLink and NotesDocument.Send for LotusScript.

Subject: RE: Sending the current document and a doclink

I’m trying to send the current open document to an addressee and include in this a doclink to the current document. The document should be sent directly without having it open as a memo in my mail database.

Here are two examples of what I’ve tried:

(1) The following is intended to create a doc link from the current doc. The link is pasted into a Rich Text field. Because @MailSend has no parameters, the current document rather than a memo should be sent.

@Command( [EditMakeDocLink] );

REM { now paste it into a Rich Text Field };

@Command ([EditGotoField]; “TestRichText”);

@Command ([EditPaste]);

@Command([FileSave]);

@MailSend;


(2) The following is intended to copy all fields after the document is put in Read mode. Because @MailSend has a parameter, a memo with a doc link should be sent. The memo’s Rich Text field should contain a copy of the document.

REM { Put in Read mode so that all fields can be selected};

@Command( [EditDocument]; “0”)

@Command ([EditSelectAll]);

@Command ([EditCopy]);

REM { now paste it into a Rich Text Field };

@Command ([EditGotoField]; “TestRichText”);

@Command ([EditPaste]);

@Command([FileSave]);

@Command( [EditDocument]; “1”)

@MailSend(“John Smith/Atlanta/IBM”);

Neither of these two options nor numerous others I’ve tried have worked. If LotusScript is employed with the AppendDocLink and Send methods, only the doclink is sent even though the ‘Store form in document’ option is checked.

I’d appreciate any suggestions.

Thanks very much.

Subject: RE: Sending the current document and a doclink

What would make you think that the code in 2 would create and send a with a copy of the document in the body? And there’s just something, I don’t know, creepy about putting appending a link to self to a document.

If you want to send a picture of the document along with a link, then use the LotusScript RenderToRTItem and AppendDoclink methods. You can probably do it in Formula Language now with a combination of @Command([MailForward]) and what you have in 1 (above).