How to create documents without form using lotus script

hi everybody! Anyone plz help me.

 How to create documents without using form in lotus script?



  Thanx in advance

Subject: How to create documents without form using lotus script

This’ll work in an agent:

Dim s as Notessession

Dim db as Notesdatabase

Dim doc as Notesdocument

Set s = New Notessession

Set db = s.CurrentDatabase

Set doc = db.CreateDocument

doc.SomeField = “Hello, world!”

call doc.save(true, true)

What the script does is to get a handle on the current database, create a document, set the value of a field named SomeField, and save it.

Subject: RE: How to create documents without form using lotus script

I’d recommend using

doc.Form = “Some form name”

before saving though, so you can select it in a view.

Dave

Subject: RE: How to create documents without form using lotus script

You can select a document for a view whether or not it has a form name attached to it; selection by form is a common means of building selection formulae, but certainly not the only one. Of course, it’s a good idea to indicate a form, if only so that it doesn’t get pulled up in a possibly inappropriate default form.

Subject: RE: How to create documents without form using lotus script

The Form item is also map-optimised in the saved document even without using the optimization settings, so selections based on Form are slighly quicker than selections based on “ordinary” items. Or so the Lotus documentation tells me. This seems to be consistent with the structure exposed in DXL, where form is an attribute of the element rather than being a separate .