Creating connection document via lotusscript

Hi All,

I have created a lotusscript through which we can create connection document-Below is my script.


Sub Click(Source As Button)

Dim Workspace As New NotesUIWorkspace

Dim UIDdoc As NotesUIDocument

Set uidoc = workspace.composedocument(“”,“names.nsf”,“Connection”)

Call uidoc.fieldsettext(“ConnectionType”,“Local Area Network”)

Call uidoc.refreshhideformulas

Call uidoc.fieldsettext(“PortName”,“TCPIP”)

Call uidoc.fieldsettext(“LanPortName”,“TCPIP”)

Call uidoc.fieldsettext(“ConnectionLocation”,“Office”)

Call uidoc.refreshhideformulas

Call uidoc.fieldsettext(“Destination”,“abc/xyz”)

Call uidoc.fieldsettext(“OptionalNetworkAddress”,“1.2.3.4”)

Call uidoc.fieldsettext(“Source”,“*”)

Call uidoc.refresh

Call uidoc.save

Call uidoc.close

End Sub


It will help me if i want to create only single connection document to whcich i hardcode it but i want to achive in a different way.I want to click on my button and it run my code and when control pass to these fields- ConnectionLocation,Destination OptionalNetworkAddress,Source, that time control pop up me to put value on these field through a popup box.

So each time if i create a new connection doc for a new server, other fields will be same instead of these four field.

If someone have any idea, please update my script.Effort will be appritiated.

Thank You.

Subject: Hi Kyle.thanks for your valueable comment.Can you please show me your agent and i can try it it will give me my desired output.

Subject: I am not sure, but for pop-up try inputbox

I am unclear on what you are trying to do.

You are using a lot of UI calls. I am use to more backend calls for the type of stuff you are doing.

For a pop-up dialog, I would recommend you try a inputbox. For fancier dialogs, I would create a Notes form, and use NotesUIWorkspace.DialogBox to substitute the Notes form as the dialog AND process the underlying NotesDocument reference.

-Kyle Huang