Manage Learn to apply best practices and optimize your operations.

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)

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close