Right icon attaching file via LotusScript
Here is an easy way to attach a file via Lotus Script and display the right icon (not Appear as V2 Style Attachments).
Here is an easy way to attach a file via Lotus Script and display the right icon (not Appear as V2 Style Attachments).
In a form create a Rich Text Field named 'Body' and a button. Create 2 agent.
'Button Click (Formula) @PostedCommand([ToolsRunMacro]; "(Agent1)"); @PostedCommand([ToolsRunMacro]; "(Agent2)") 'First Agent (Lotus Script) Sub Initialize On Error Goto ErrorHandler Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As notesdocument '********** ' Assign a full pathname '********** Const SCANFILEPATH$={C:Tempimage.tiff} Set uidoc = ws.CurrentDocument Set doc = uidoc.document Call uidoc.FieldSetText("ScanFilePath", SCANFILEPATH) Call uidoc.save TheEnd: Exit Sub ErrorHandler: Messagebox {The following unexpected error has occured: } & Trim$(Str
(Err)) & {: } & Error$, 0+48+0+0, {Error Message..} Resume TheEnd End Sub 'Second Agent (Formula) @PostedCommand([EditGotoField];"Body") : @PostedCommand
( [EditInsertFileAttachment] ; ScanFilePath)