[ver]
	4
[sty]
	
[files]
[charset]
	82
	ANSI (Windows, IBM CP 1252)
[revisions]
	0
[prn]
	PostScript (QMS)
[port]
	LPT2:
[lang]
	1
[fldnames]
	Field1
	Field2
	Field3
	Field4
	Field5
	Field6
	Field7
	Field8
[desc]
	LotusScript Tutorial for first-time users
	
	
	
	
	802648564
	20
	792275887
	1820
	12
	0
	0
	0
	0
	
	
	
	
	
	
	1
[fopts]
	0
	1
	0
	0
	
	
[lnopts]
	2
	Body Text
	1
[docopts]
	5
	2
[GramStyle]
	
[ParaNum]
	1
[tag]
	Body Text
	2
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		100
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Body Text
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Ahead
	3
	[fnt]
		Arial
		220
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		240
		4
		79
		0
		3
		100
	[brk]
		112
	[line]
		16
		2160
		3
		0
		1
		1
		1
		65
		10
		1
	[spec]
		0
		1
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Bhead title
	4
	[fnt]
		Arial
		200
		0
		16385
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		220
		4
		79
		0
		3
		100
	[brk]
		80
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Chead title
	5
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		79
		0
		3
		100
	[brk]
		112
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		3
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Body Text
	0
	0
[tag]
	Bhead
	6
	[fnt]
		Arial
		200
		0
		16385
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		220
		4
		180
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Chead
	7
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		3
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Numbered list
	8
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		300
		300
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		5
		<*:>.
		0
		3
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Numbered list
	0
	0
[tag]
	1st lev para
	9
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		0
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		68
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	1st lev para
	0
	0
[tag]
	Bullet
	11
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		120
		180
		180
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		</U>
		0
		3
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Bullet
	2
	1
	160
	1
	400
	0
[tag]
	Indnt bullet
	12
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		420
		180
		180
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		16
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		</U>
		0
		3
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Indnt bullet
	0
	0
[tag]
	2nd lev para
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		600
		0
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	2nd lev para
	0
	0
[tag]
	See also prnt
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also prnt
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Book art
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Book art
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Callout text
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Callout text
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Figure title
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		40
		60
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Figure title
	0
	0
[tag]
	Chapter title
	0
	[fnt]
		Arial
		280
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		300
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Chapter title
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	1st pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	1st pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Right pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Right pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Left pg foot
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Left pg foot
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Table title
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		60
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		7
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Table title
	0
	0
[tag]
	Table col hd
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		4
	[line]
		10
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		6
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		256
		1
		0
		
		
		
	Table col hd
	0
	0
[tag]
	Table Text
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		200
		4
		79
		0
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		256
		1
		0
		
		
		
	Table Text
	0
	0
[tag]
	See also hlp
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		40
		4
		180
		0
		3
		100
	[brk]
		96
	[line]
		9
		0
		3
		0
		1
		1
		1
		70
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also btn
	0
	120
[tag]
	See also btn
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		240
	[spc]
		24
		200
		4
		0
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	See also btn
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Crossref
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		513
		3
		0
		300
		600
	[spc]
		24
		200
		4
		19
		0
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Crossref
	0
	0
[tag]
	Indnt caution
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		720
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Indnt caution
	0
	0
[tag]
	Indnt tip
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		324
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Tip
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Indnt tip
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Indnt note
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		300
		468
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Indnt note
	0
	0
[tag]
	Caution
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		720
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Caution
	0
	0
[tag]
	Tip
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		324
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Tip
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Tip
	0
	0
[tag]
	Note
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		468
		0
	[spc]
		40
		200
		4
		19
		60
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		256
		1
		2
		.
		,
		$
	Note
	0
	0
[tag]
	Mono
	0
	[fnt]
		Courier New
		180
		0
		32768
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		48
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Mono
	15
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	1
	2880
	1
	3360
	1
	3840
	1
	4320
	1
	4800
	1
	5280
	1
	5760
	1
	6240
	1
	6720
	1
	7200
	0
[tag]
	Indnt mono
	0
	[fnt]
		Courier New
		180
		0
		32768
	[algn]
		1
		3
		300
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		32
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Indnt mono
	15
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	1
	2880
	1
	3360
	1
	3840
	1
	4320
	1
	4800
	1
	5280
	1
	5760
	1
	6240
	1
	6720
	1
	7200
	0
[tag]
	Dhead
	0
	[fnt]
		Arial
		180
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		100
		0
		3
		100
	[brk]
		68
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Parameter
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		0
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Parameter
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	Formula
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Formula
	0
	0
[tag]
	Browse
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		+
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Browse
	0
	0
[tag]
	Keyword
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		K
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Keyword
	0
	0
[tag]
	Context
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		#
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Context
	0
	0
[tag]
	Title
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		$
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Title
	0
	0
[tag]
	Macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		!
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Macros
	0
	0
[tag]
	Footnote
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		244
		0
	[spc]
		40
		2400
		3
		0
		0
		1
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		256
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Footnote
	0
	0
[tag]
	Alink
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		A
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Alink
	0
	0
[tag]
	Butnbar
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		200
		4
		0
		0
		3
		100
	[brk]
		48
	[line]
		16
		0
		3
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		\li-140 
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		wr
	Butnbar
	0
	0
[tag]
	Window
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		>
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Window
	0
	0
[tag]
	Win95 macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		W
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Win95 macros
	0
	0
[tag]
	Win31 macros
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		X
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Win31 macros
	0
	0
[tag]
	Build tag
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		139
		139
	[spc]
		24
		200
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		16
		0
		3
		0
		1
		2
		2
		20
		20
		1
	[spec]
		0
		0
		*
		0
		3
		1
		256
		1
		0
		0
	[nfmt]
		280
		1
		3
		.
		,
		$
	Build tag
	0
	0
[tag]
	_COND_IF
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_IF
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	_COND_ELSE
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_ELSE
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[tag]
	_COND_ENDIF
	0
	[fnt]
		Arial
		180
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		200
		4
		19
		60
		3
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	_COND_ENDIF
	5
	1
	480
	1
	960
	1
	1440
	1
	1920
	1
	2400
	0
[lay]
	Standard
	3079
	[rght]
		12960
		10166
		1
		960
		1200
		3
		960
		720
		0
		1
		0
		1
		0
		2
		1
		960
		9446
		1
		1
		3120
	[lft]
		12960
		10166
		1
		720
		1200
		3
		960
		960
		0
		1
		0
		1
		0
		2
		1
		720
		9206
		1
		1
		3120
	[hlft]
	[lyfrm]
		1
		3008
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		3
	[frmlay]
		960
		10166
		1
		720
		180
		3
		0
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		1
		2
		4674
	[txt]
>
	[hrght]
	[lyfrm]
		1
		11200
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		1
	[frmlay]
		960
		10166
		1
		960
		180
		3
		0
		720
		0
		1
		0
		1
		1
		0
		1
		960
		9446
		1
		2
		4674
	[txt]
>
	[flft]
	[lyfrm]
		1
		5056
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		4
	[frmlay]
		12960
		10166
		1
		720
		480
		3
		11940
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		1
		3
		9900
	[txt]
>
	[frght]
	[lyfrm]
		1
		13248
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		2
	[frmlay]
		12960
		10166
		1
		960
		480
		3
		11940
		720
		0
		1
		0
		1
		1
		0
		1
		960
		9446
		1
		3
		9900
	[txt]
>
[elay]
[l1]
	0
[pg]
	1
	31 0 72 32 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
[edoc]
@Ahead@<:#240,8486>About using LotusScript in Notes

<:#400,8486>Welcome to LotusScript. This section is designed to give you a quick orientation to the features in LotusScript for Notes. You should already be familiar with Notes application development.

@Ahead@<:#240,8486>Creating a test discussion database

<:#400,8486>This section uses a discussion database to demonstrate the features of LotusScript. Before you begin, create a new database from the Discussion template.

@Numbered list@<:#200,8486>Choose File - Database - New.

@Numbered list@<:#200,8486>For Server, use Local.

@Numbered list@<:#200,8486>Enter the Title. The examples here use "Learning LotusScript".

@Numbered list@<:#200,8486>Enter the Filename. The examples here use "learning.nsf".

@Numbered list@<:#400,8486>Select Show All Templates. If you don't see a list of templates, select Template Server and choose a server that contains the templates.

@Numbered list@<:#200,8486>Select the Discussion template.

@Numbered list@<:#200,8486>Deselect Inherit future design changes.

@Numbered list@<:#200,8486>Select OK.

@Ahead@<:#240,8486>Ways to learn about LotusScript

<:#400,8486>This section steps you through the creation of several working scripts in the Learning LotusScript discussion database you just created:

@Bullet@<:#200,8486>About creating a button script

@Bullet@<:#200,8486>About creating an agent script

@Bullet@<:#200,8486>About creating a form action script

@Ahead@<:#240,8486>About creating a button script

<:#400,8486>In this section, you'll create a script that prints the title of a database whenever a user clicks a button on a document. You'll learn:

@Bullet@<:#200,8486>How to decide what Notes event will trigger your script

@Bullet@<:#200,8486>How to create and edit a script

@Bullet@<:#200,8486>How to use an object to access a Notes database in a script

@Bullet@<:#200,8486>How  to use an object's properties

@Bullet@<:#200,8486>How to compile and test a script

@Ahead@<:R1,0,><:#240,8486>About responding to events

<:R1,0,><:#600,8486>Every script in Notes responds to an event. An event is something that happens, like a user clicking a button, creating a new document, or placing the cursor in a field. When the event happens, the script runs. Before you type in a script, you need to decid
e what event it responds to.

@Bhead title@<:R1,0,><:#220,8486>Creating a button script

<:R1,0,><:#400,8486>Your first script responds to a button click. Once you create the button, you'll see the programmer's pane at the bottom of the screen--this is where you type your script.

@Numbered list@<:R1,0,><:#200,8486>Choose Create - Main Topic to create a new Main Topic document in the database.

@Numbered list@<:R1,0,><:#200,8486>Enter a brief subject for the document, such as "Scripting in Notes is a joy."

@Numbered list@<:R1,0,><:#200,8486>Place the cursor in the body field and choose Create - Hotspot - Button.

@Numbered list@<:R1,0,>Give the button a label, such as "Print title!", in the button InfoBox and click the green check mark to save it.

@Numbered list@<:R1,0,>Select the "Print title!" button from the list of programmable objects under Define.

@Numbered list@<:R1,0,><:#200,8486>Select the Script option button.

@Numbered list@<:R1,0,>Select Click from the list of button events under Events.

@Ahead@<:R1,0,><:#240,8486>About objects

<:R1,0,><:#400,8486>When you selected the Click event in the programmer's pane, Notes displayed an empty subroutine (or "sub").

@Mono@<:R1,0,>Sub CLICK(SOURCE As BUTTON)<**><**>End Sub

<:R1,0,>Notes runs this sub whenever the user clicks the button. Inside the sub, you write LotusScript statements. Each event in Notes has a different sub; the name of the sub depends on which event the script responds to. Notes creates the syntax of the empty sub 
for you. 

<:R1,0,>To get the sub to do something in Notes, you use both the LotusScript language and Notes objects. The LotusScript language is the same for any Lotus product, while Notes objects are specific to Notes. To access a database, you use a NotesDatabase object. To
 access a view, you use a NotesView object. To access a document, you use a NotesDocument or NotesUIDocument object. There are more objects you can use, but we'll focus on these four.

@Bhead title@<:R1,0,><:#220,8486>Creating a NotesDatabase object

<:R1,0,><:#200,8486>Create a NotesDatabase object in the button click script.

<:R1,0,>In the body of the sub, type the following:<:f,QCourier New,><**>Dim db 
<:f><:f,QCourier New,>as New NotesDatabase( "<:f><:f,QCourier New,>", "learning<:f><:f,QCourier New,>.nsf" )<:f>

<:R1,0,><:#800,8486>Your script should look like this:<**><:f,QCourier New,>Sub CLICK(SOURCE As BUTTON)<**>  Dim db 
<:f><:f,QCourier New,>as New NotesDatabase( "<:f><:f,QCourier New,>", "learning<:f><:f,QCourier New,>.nsf" )<**>End Sub<:f>

<:R1,0,>Don't save the script yet. You'll do that in a minute.

@Chead@<:R><:#200,8486>Details: Creating a NotesDatabase object

<:R1,0,><:#400,8486>The line of script you just entered means: "I want to access the learning.nsf database on my local drive, and I want to use the name db to refer to this database."

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>Dim <:f>tells LotusScript that you are declaring a variable. You use 
<:f,QCourier New,>Dim<:f> (along with <:f,QCourier New,>As<:f>) any time you declare a variable.

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>db <:f>is the name of the variable. You can call variables by almost any name you want, but it's best to give them mnemonic names.

@Bullet@<:R1,0,><:#200,8486><:f,QCourier New,>New<:f> tells LotusScript that you are creating an object that will be assigned to 
<:f,QCourier New,>db<:f>.

@Bullet@<:R1,0,><:#600,8486><:f,QCourier New,>NotesDatabase<:f> tells LotusScript that you want the 
<:f,QCourier New,>db <:f>object to be an instance of the NotesDatabase class. This will be explained in detail later. For now, remember that 
<:f,QCourier New,>db <:f>refers to the Learning LotusScript discussion database.

@Bullet@<:R1,0,><:#600,8486><:f,QCourier New,>""<:f> and <:f,QCourier New,>"learning<:f><:f,QCourier New,>.nsf"<:f> are parameters. The first parameter, 
<:f,QCourier New,>""<:f>, is the name of the server -- here it's an empty string because the database is on your local drive. The second parameter, 
<:f,QCourier New,>"learning<:f><:f,QCourier New,>.nsf"<:f> is the file name of the database.

@Ahead@<:R1,0,><:#240,8486>About properties

<:R1,0,><:#1000,8486>The script isn't ready to run yet. You still need to write a line to print the title of the database. To do this, use a property of the NotesDatabase class. A property is an attribute of an object, such as the file name of a database, the creation date of a
 document, or the columns in a view. So, for example, the NotesDatabase class has a FileName property, the NotesDocument class has a Created property, and the NotesView class has a Columns property.

<:R1,0,><:#200,8486>There are two kinds of properties:

@Bullet@<:R1,0,>Read-write properties, which you can both access and modify

@Bullet@<:R><:#200,8486>Read-only properties, which you can access, but not modify

<:R1,0,><:#400,8486>In most cases, properties that have to do with the design of a database (such as the Columns property) are read-only.

<:R1,0,><:#200,8486>To access or modify a property in a script, you need three things:

@Bullet@<:R1,0,><:#200,8486>The name of the object, such as <:f,QCourier New,>db<:f>

@Bullet@<:R1,0,><:#200,8486>A dot, or period (.)

@Bullet@<:R1,0,><:#200,8486>The name of the property

<:R1,0,>For example, you could write this line of LotusScript to access and print the file name of the database:

@Mono@<:R1,0,><:#200,8486>print db.FileName

<:R1,0,><:#200,8486>This line prints:

<:R1,0,><:#200,8486>learning.nsf

<:R1,0,><:#400,8486>When you define a different NotesDatabase object, you can use the same property name, but you get a different result:

@Mono@<:R1,0,><:#400,8486>Dim salesDb as New NotesDatabase( "Sales_Server", "campaigns\1995.nsf" )<**>print salesDb.FileName

<:R1,0,>This script prints:

<:R1,0,><:#200,8486>1995.nsf

<:R1,0,><:#400,8486>The syntax for modifying a property is similar to the syntax for accessing one, except that you assign the property a value. This code, for example, modifies the EncryptOnSend property for a NotesDocument:

@Mono@<:R1,0,><:#200,8486>myDocument.EncryptOnSend = True

@Bhead title@<:R1,0,><:#220,8486>Accessing the Title property

<:R1,0,><:#200,8486>Write the code to print the title of the database.

<:R1,0,><:#200,8486>After the Dim line in the button click script, type the following:

@Mono@<:R1,0,>Messagebox( db.Title )

<:R1,0,><:#200,8486>Your script should now look like this:

@Mono@<:R1,0,><**>Sub CLICK(SOURCE As BUTTON)<**>  DIM db as New NotesDatabase( "", "learning.nsf" )<**>  Messagebox( db.Title )<**>End Sub

@Chead@<:R1,0,>Details: Accessing the Title property

<:R1,0,>Like last time, the first line of script means: "I want to access the learning.nsf database on my local drive, and I want to use the name db to refer to this database."

<:R1,0,>The second line means: "I want to print the title of the database in a dialog box."

@Bullet@<:R1,0,><:f,QCourier New,>Messagebox <:f>is a LotusScript function that takes a string and prints it in a dialog box. It's one of many functions and statements you can use in any Lotus product, not just Notes.

@Bullet@<:R1,0,><:f,QCourier New,>db.Title <:f>returns a string containing the title of the learning.nsf database.

@Ahead@<:R1,0,><:#240,8486>Compiling and testing the script

<:R1,0,>The script is ready for a trial run. Notes compiles the button script when you close and save the document it's on.

@Numbered list@<:R1,0,><:#200,8486>Choose File - Close.

@Numbered list@<:R1,0,>Select Yes to save the document. If an error appears at the bottom of the programmer's pane, see the Details section below.

@Numbered list@<:R1,0,><:#200,8486>Open the document from the view.

@Numbered list@<:R1,0,><:#400,8486>Click the Print title! button. Notes displays a dialog box that says "Learning LotusScript," which is the title of the database. Success!

@Chead@<:R1,0,>Details: Compiling and testing the script

<:R1,0,>If Notes tells you that the button script contains an error, you've probably made a typing mistake. Check each line of the script carefully to make sure it looks exactly like the sample script given here. Then try saving it again.

<:R1,0,>Errors are a fact of life. There are three kinds, and you'll probably encounter all of them:

@Bullet@<:R1,0,>Compiler errors occur when the script contains a mistake in syntax. Happily, these are usually caused by typing errors, or by a variable or parameter that's the wrong type. Unhappily, a script will not run until you've corrected every compiler error.

@Bullet@<:R1,0,>Run-time errors occur when a method or property could not do its job, usually because it can't do what the script asks it to do. In the button script, for example, if the learning.nsf database does not exist on your local drive, a run-time error occurs. You
 can write error-handling subs to cover your bases in these situations.

@Bullet@<:R1,0,>Logical errors occur when you think the script is doing one thing, but it's actually doing another. If you think you have a logical error in a script, use the debugger (you'll see how in a minute).

@Ahead@<:R1,0,><:#240,8486>About creating an agent script

<:R1,0,>In this section, you'll create a more sophisticated script by building upon what you just learned. You'll write an agent that opens the Learning LotusScript discussion database and counts the number of documents in the Main View. You'll learn:

@Bullet@<:R1,0,><:#200,8486>How an agent responds to an event

@Bullet@<:R1,0,><:#200,8486>How to use an object's methods

@Bullet@<:R1,0,><:#200,8486>How to open a particular view within a database

@Bullet@<:R1,0,><:#200,8486>How to navigate through a view to reach a document

@Bullet@<:R1,0,><:#200,8486>How to use a loop

@Bhead@<:R1,0,><:#220,8486>Adding documents to the test database

<:R1,0,><:#200,8486>Add some documents to your test database so that your agent script will have something to work with.

@Numbered list@<:R1,0,><:#200,8486>Open the Learning LotusScript database.

@Numbered list@<:R1,0,><:#200,8486>Create and save several new documents.

@Ahead@<:R1,0,><:#240,8486>About agents and events

<:R1,0,>Every agent script responds to the same event, Initialize. You designate a trigger for the agent using the Agent Builder, and the script in the Initialize sub of the agent runs as soon as the trigger occurs. You can choose to run an agent from the menu, on 
a schedule, or when documents are mailed or pasted into a database. 
<-">Here, you'll create an agent script that runs when the user chooses it from the menu.

@Bhead title@<:R1,0,>Creating an agent with a script

<:R1,0,>When you create an agent, the programmer's pane appears at the bottom of the screen, just like it did when you created the button script. Additional options specific to the Agent Builder are at the top of the screen.

@Numbered list@<:R1,0,>In the Learning LotusScript database, choose Create - Agent.

@Numbered list@<:R1,0,><:#200,8486>Enter a Name for the agent, such as "My first agent."

@Numbered list@<:R1,0,><:#200,8486>Select Shared Agent.

@Numbered list@<:R1,0,>Select Manually from Menu under When should this agent run? This is what triggers the agent.

@Numbered list@<:R1,0,><:#200,8486>Select Script under What should this agent do?

@Numbered list@<:R1,0,><:#200,8486>Select Initialize under Events.

@Numbered list@<:R1,0,>In the programmer's pane, modify the Initialize script so that it looks like this (we'll add on to it in a moment):<:f,QCourier New,><**>Sub Initialize<:f><:f,QCourier New,><**>  Dim db As New NotesDatabase( "", "learning.nsf" )<:f><:f,QCourier New,><**>  M
essagebox( db.Title )<**>End Sub<:f>

@Numbered list@<:R1,0,>Choose File - Close.

@Numbered list@<:R1,0,>Select Yes to save the agent.

@Numbered list@<:R1,0,><:#200,8486>Choose Actions - My first agent.

@Chead@<:R1,0,><:#200,8486>Details: Creating an agent with a script

<:R1,0,><:#200,8486>There are two parts to any successful agent: the script itself, and the Agent Builder options you choose.

@Dhead@<:R1,0,><:#200,8486>The script

<:R1,0,>Like last time, the script you just entered means: "I want to access the learning.nsf database on my local drive, and I want to use the name db to refer to this database. Then I want to print the title of the database in a dialog box."

<:R1,0,><:#800,8486>The script's behavior is identical to that of the button script you wrote, but it has one advantage: the location of the database is not specified, which means you don't have to modify the script if you move the database or use the script in a different dat
abase. You can use this technique in any script, not just agent scripts.

@Bullet@<:R1,0,><:f,QCourier New,>Dim session As New NotesSession<:f>  creates a new NotesSession object that represents the current session.

@Bullet@<:R1,0,><:#200,8486><:f,QCourier New,>Dim db As NotesDatabase<:f>  declares a NotesDatabase object.

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>Set db = session.CurrentDatabase<:f>  assigns a value to db using the CurrentDatabase property of session. Now you've seen the two ways to assign a value to an object:

@Indnt bullet@<:R1,0,><:#400,8486>Use New to create a new object. Depending on the class, New may have no parameters (as it does for NotesSession) or require one or more parameters (as it does for NotesDatabase).

@Indnt bullet@<:R1,0,><:#200,8486>Use Set to set an object equal to the value returned by a property or method.

@Bullet@<:R1,0,><:#200,8486><:f,QCourier New,>Messagebox( db.Title )<:f> should look familiar from the previous script.

@Dhead@<:R1,0,><:#200,8486>The Agent Builder options

<:R1,0,><:#400,8486>The Agent Builder options you chose mean: "I want this script to be available to all users of the database, and I want them to trigger it by choosing it from the menu."

@Bullet@<:R1,0,><:#200,8486>Shared Agent means that the agent is public and any user can run it.

@Bullet@<:R1,0,><:#600,8486>Manually from Menu means you want to run the agent whenever a user chooses it from the Actions menu. This is the event that triggers the agent, same as a button click triggered the button script. There are several other options, too.

@Bullet@<:R1,0,><:#600,8486>Which documents should it act on? isn't applicable when you create an agent that runs a script (notice how it turns grey after you select Script). If you want an agent's script to act on a particular set of documents, the script must use Notes objects to fi
nd the documents.

@Bullet@<:R1,0,><:#400,8486>Script means you want the agent to run a script. The other options are to have it perform a simple action or execute a formula.

@Bullet@<:R1,0,><:#200,8486>The Initialize event means the script runs as soon as the agent is triggered. 
<+!><+">YY is that right?<-"><-!>

@Bhead title@<:R1,0,><:#220,8486>Using the GetView method

<:R1,0,><:#200,8486>Next, write the code to access the Main View in the Learning LotusScript database.

@Numbered list@<:R1,0,><:#200,8486>In the folder pane, select Agents.

@Numbered list@<:R1,0,><:#200,8486>Open My first agent. The Agent Builder appears.

@Numbered list@<:R1,0,><:#200,8486>Under Events, select Initialize. The script you just wrote appears.

@Numbered list@<:R1,0,><:#2400,8486>Edit the script by deleting the Messagebox line, and adding the following lines:<:f,QCourier New,><**>  Dim view as NotesView<**><:f><:f,QCourier New,>  Set view = db.GetView( "Main View" )<:f><**><**>Your script should now look like this:<:f,QCourier New,>
<**>Sub Initialize<**>  Dim session As New NotesSession<**>  Dim db As NotesDatabase<**><:f><:f,QCourier New,>  Dim view as NotesView<:f><:f,QCourier New,><**>  Set db = session.CurrentDatabase<**>  Set view = db.GetView( "Main View" )<:f><:f,QCourier New,>
<**>End Sub<:f>

@Chead@<:R1,0,><:#200,8486>Details: Using the GetView method

<:R1,0,><:#400,8486>Like last time, the first line of script means: "I want to access the current database, and I want to use the name db to refer to this database."

<:R1,0,><:#400,8486>The next two lines mean: "I want to access the Main View in the current database, and I want to use the name 
<:f,QCourier New,>view <:f>to refer to this view."

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>Dim view <:f><:f,QCourier New,>as NotesView<:f> declares a NotesView object and gives it a name, view. The next line indicates which view you mean.

@Bullet@<:R1,0,><:#600,8486><:f,QCourier New,>Set view <:f><:f,QCourier New,>= db<:f><:f,QCourier New,>.GetView( "Main View<:f><:f,QCourier New,>" )<:f> calls GetView, which is a method defined in the NotesDatabase class. It sends the method a parameter,<+"> 
<-">"Main View", that indicates the name of the view you want. GetView returns a NotesView object, which you then set to be equal to view.

@Ahead@<:R1,0,><:#240,8486>About methods

<:R1,0,><:#800,8486>Just like a property is an attribute of an object, a method represents a behavior of an object. For example, you can replicate a database, copy a document to another database, and filter a view with a full text search. So, for example, the NotesDatabase cla
ss has a Replicate method, the NotesDocument class has a CopyToDatabase method, and the NotesView class has a FullTextSearch method.

<:R1,0,><:#200,8486>To call a method in a script, you need four things:

@Bullet@<:R1,0,><:#200,8486>The name of the object, such as <:f,QCourier New,>db<:f> or <:f,QCourier New,>view<:f>

@Bullet@<:R1,0,><:#200,8486>A dot, or period (.)

@Bullet@<:R1,0,><:#200,8486>The name of the method

@Bullet@<:R1,0,><:#200,8486>Any parameters required by the method

<:R1,0,><:#400,8486>Unlike a property, which always returns a value, some methods return values and others don't. There are several ways to call a method.

@Bullet@<:R1,0,><:#400,8486>To call a method when there's no return value, use Call:<**><:f,QCourier New,>Call myView.Refresh<:f>

@Bullet@<:R1,0,><:#1600,8486>To call a method when there is a return value, assign the value to a variable. If there are parameters, put them in parentheses.<**><:f,QCourier New,>Dim success as Integer<**>success = myDb.Replicate( "Marketing_Server" )<**><**><:f>Or use the return value
 in an expression:<:f,QCourier New,><**>If myDb.Replicate( "Marketing_Server" ) Then<**>  Print "Replication successful"<:f>

@Bullet@<:R1,0,><:#800,8486>To call a method when there is a return value that's an object, assign the value to an object using Set:<:f,QCourier New,><**>Set db = session.CurrentDatabase<:f><**><:f,QCourier New,>Set view 
<:f><:f,QCourier New,>= db<:f><:f,QCourier New,>.GetView( "Main View<:f><:f,QCourier New,>" )<:f>

@Bullet@<:R1,0,><:#400,8486>To call a method that returns a value you don't need, use Call:<**><:f,QCourier New,>Call 
<:f><:f,QCourier New,>myDocument.CopyToDatabase( yourDb )<:f>

@Bhead title@<:R1,0,><:#220,8486>Using the GetFirstDocument method

<:R1,0,><:#400,8486>Next, use a method in the NotesView class to access one of the documents in the view. Then you'll be ready to give the script a trial run.

@Numbered list@<:R1,0,><:#400,8486>Under the declaration of <:f,QCourier New,>view<:f>, type the following:<:f,QCourier New,><**>Dim doc 
<:f><:f,QCourier New,>as NotesDocument<:f>

@Numbered list@<:R1,0,><:#2600,8486>Under the line where the script calls GetView, type the following:<:f,QCourier New,><**>Set doc 
<:f><:f,QCourier New,>= view<:f><:f,QCourier New,>.GetFirstDocument<**><**><:f>Your script should now look like this:<:f,QCourier New,><**>Sub Initialize<**>  Dim session As New NotesSession<**>  Dim db As NotesDatabase<**><:f><:f,QCourier New,>  Dim view a
s NotesView<**>  Dim doc as NotesDocument<:f><:f,QCourier New,><**>  Set db = session.CurrentDatabase<**>  Set view = db.GetView( "Main View" )<**>  Set doc = view.GetFirstDocument<:f><:f,QCourier New,><**>End Sub<:f>

@Numbered list@<:R1,0,><:#200,8486>Close and save the agent.

@Chead@<:R1,0,><:#200,8486>Details: Using the GetFirstDocument method

<:R1,0,><:#400,8486>The two new lines mean: "I want to access the first document in the Main View, and I want to use the name doc to refer to this document."

<:R1,0,><:#400,8486>GetFirstDocument is a method defined in the NotesView class. Here, the script calls GetFirstDocument using the 
<:f,QCourier New,>view <:f>object. It takes no parameters, and it returns a NotesDocument object.

@Bhead title@<:R1,0,><:#220,8486>Using the debugger

<:R1,0,><:#600,8486>Let's test the script to make sure that doc actually gets assigned to the first document in the view. Once you're sure that the script works properly, you'll add the code to count all the documents in the view. To test the script, use the LotusScript debugg
er.

@Numbered list@<:R1,0,><:#400,8486>Open the Main View in the Learning LotusScript database, scroll to the top of the view, and write down the contents of the Topic field of the first document.

@Numbered list@<:R1,0,><:#400,8486>Choose File - Tools - Debug LotusScript. This puts Notes into debug mode. Any time you run a script with Debug LotusScript enabled, the debugger opens.

@Numbered list@<:R1,0,><:#400,8486>Choose Actions - My first agent. The debugger opens. This is where you can step through scripts one line at a time and watch variables change.

@Numbered list@<:R1,0,><:#400,8486>Click once in the margin next to the line where doc is assigned a value. This places a breakpoint in the script.

@Numbered list@<:R1,0,><:#200,8486>Choose Debug - Go. The script runs from the beginning, but stops just before the breakpoint.

@Numbered list@<:R1,0,><:#200,8486>Choose Debug - Step Over. The debugger steps through the script by executing the next line of code.

@Bhead title@<:R1,0,><:#220,8486>Watching the doc object

<:R1,0,><:#600,8486>You can now examine the doc object to make sure it references the right document. All the lines in the script have been executed, but the sub hasn't exited (we haven't reached 
<:f,QCourier New,>End Sub<:f> yet), so you can watch the variables you've declared.

@Numbered list@<:R1,0,><:#200,8486>Click the Variables tab.

@Numbered list@<:R1,0,><:#200,8486>Double-click <:f,QCourier New,>doc<:f>.

@Numbered list@<:R1,0,><:#200,8486>Scroll until you find the <:f,QCourier New,>Topic <:f>item.

@Numbered list@<:R1,0,><:#600,8486>The value of the Topic should be the same as the value you wrote down earlier.<**>If it is, your script works properly, and you're ready to add to it. If it isn't, review your script to make sure you typed in everything correctly. 
<+!><+">YY Needs more<-"><-!>

@Chead@<:R1,0,><:#200,8486>Details: Watching the doc object

<:R1,0,><:#400,8486>If you have used a debugger before, you'll find the LotusScript debugger works similarly, allowing you to set breakpoints, step into or over a line of script, and watch variables change.

<:R1,0,><:#600,8486>If you have never used a debugger before, it may take a little get used to, but you'll probably find that testing your scripts using the debugger will save you time and headaches. 
<+!><+">YY explain difference between compile errors, <-!><-"><+!><+">logical errors, and runtime errors? Errors are a fact of life.<-"><-!>

@Ahead@<:R1,0,><:#240,8486><+!>About accessing <-!><+!>the rest of the view's documents

<:R1,0,><:#200,8486>You've written and tested the first part of a script, but it isn't finished. To complete the script, you will:

@Bullet@<:R1,0,><:#200,8486>Declare an integer variable to hold the count of the number of documents in the view.

@Bullet@<:R1,0,><:#400,8486>Loop through documents in the view, accessing documents after the first one, and incrementing the count as you go.

@Bhead title@<:R1,0,><:#220,8486>Using the GetNextDocument method and a loop

<:R1,0,><:#200,8486>Complete the script.

@Numbered list@<:R1,0,><:#200,8486>Open your agent.

@Numbered list@<:R1,0,><:#200,8486>Open the script for the Initialize event. You should see the script you've been working on.

@Numbered list@<:R1,0,><:#3400,8486>Modify the script so that it looks like this. Additional lines are in bold.<**><:f,QCourier New,>Sub Initialize<**>  Dim session As New NotesSession<**>  Dim db As NotesDatabase<**>  Dim view As NotesView<**>  Dim doc As NotesDocument<**>  Set db = session.
CurrentDatabase<**>  Set view = db.GetView( "Main View" )<**>  Set doc = view.GetFirstDocument<**>  
<+!>count% = 1<-!><**>  <+!>' this loop contains an error<**>  Do Until doc Is Nothing<**>    Set doc = view.GetNextDocument( doc )<**>    count% = count% + 1<**>  Loop<**>  Messagebox( Cstr( count% ) )<**><-!>End Sub<:f>

@Numbered list@<:R1,0,><:#200,8486>Close and save the agent.

@Chead@<:R1,0,><:#200,8486>Details: Using the GetNextDocument method and a loop

<:R1,0,><:#800,8486>The lines of script you added mean: "I want to declare an integer called count and assign it a value of 1. Then I want to count how many documents are in the view by stepping through each document and incrementing 
<:f,QCourier New,>count%<:f> until each document has been counted. Last, I want to display the count in a dialog box on the screen."

@Bullet@<:R1,0,><:#800,8486><:f,QCourier New,>count% = 1 <:f>tells LotusScript that you want an integer variable called 
<:f,QCourier New,>count%<:f> and set its value to 1. The % implicitly declares count as an integer. When you set the value of an object, you need to use the 
<:f,QCourier New,>Set <:f>keyword, but when you set the value of an integer or other "plain" data type, you don't need Set.

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>' this loop contains an error <:f> is a comment. Any line that begins with ' (apostrophe) is ignored by LotusScript when it compiles and runs. You shouldn't ignore this comment, though...

@Bullet@<:R1,0,><:#1000,8486><:f,QCourier New,>Do Until doc is Nothing...Loop <:f>defines a block of code that will be executed multiple times until doc is Nothing. The GetNextDocument method returns Nothing when there are no more documents left in the view. Several other methods in th
e Notes class library return Nothing to indicate that the object you've asked for does not exist. The GetView method, for example, returns Nothing if you send it the name of a view that's not in the database. 
<:f,QCourier New,>Loop <:f>signals the end of the loop body.

@Bullet@<:R1,0,><:#800,8486><:f,QCourier New,>Set doc = view.GetNextDocument( doc )<:f><:f,QCourier New,> 
<:f>changes the value of doc so that it refers to the next document in the view. The method navigates the view to find the document right after 
<:f,QCourier New,>doc <:f>and returns it. Since you don't need the old value of 
<:f,QCourier New,>doc <:f>any more, but would like to use the same variable name, assign the new value to 
<:f,QCourier New,>doc<:f>.

@Bullet@<:R1,0,><:#400,8486><:f,QCourier New,>count% = count% + 1 <:f>increments the current value of count% by one. The script does this each time it gets a new document, so that it maintains a current count of documents in the view.

@Bullet@<:R1,0,><:#800,8486><:f,QCourier New,>Messagebox( Cstr( count% ) )<:f> displays the value of count% in a dialog box on the screen. Both Messagebox (which displays a dialog box) and Cstr (which converts count% from an integer to a string) are functions in the LotusScript langua
ge. You can use them in other Lotus products, not just Notes.

@Bhead title@<:R1,0,><:#220,8486>Testing the script

<:R1,0,><:#200,8486>Run the agent to make sure it's correctly adding up the number of documents in the Main View.

@Numbered list@<:R1,0,><:#200,8486>Open the Main View in the Learning LotusScript database, and count the number of documents.

@Numbered list@<:R1,0,><:#200,8486>Choose File - Tools - Debug LotusScript. This takes Notes out of debug mode.

@Numbered list@<:R1,0,><:#400,8486>Choose Actions - My first agent. Notes runs the script and displays the number of documents in the Main View. Is it correct?

@Chead@<:R1,0,><:#200,8486>Details: Testing the script

<:R1,0,><:#400,8486>The script you just wrote contains what's known as an "off-by-one" error--it counts one too many documents.

<:R1,0,><:#800,8486>If you ran this agent in a database that other users had access to on a server, it's possible that the number of documents you see displayed in the view and the number of documents that are actually in the view may differ. (For example, a user may create a 
new document after you've opened the view on your workstation -- that's usually when you see the Refresh symbol).

<:R1,0,><:#600,8486>In this case, however, the database is local and there is indeed an error in the script. It isn't totalling the number of documents in the view correctly. It's not a compile or run-time error, since the script ran just fine. But it didn't do what you wanted
 it to do--this is a logical error. This is where the debugger comes in.

@Bhead title@<:R1,0,><:#220,8486>Watching the count variable

<:R1,0,><:#200,8486>Use the debugger to step through the code and see why it's not doing what you want.

@Numbered list@<:R1,0,><:#200,8486>Choose File - Tools - Debug LotusScript.

@Numbered list@<:R1,0,><:#200,8486>Choose Actions - My first agent.

@Numbered list@<:R1,0,><:#200,8486>Blah, blah, step through the code. Off by one error.

@Bhead title@<:R1,0,><:#220,8486>Correcting the script

<:R1,0,><:#200,8486>Modify your script so that it looks like this. Changed lines are in bold.

<:R1,0,><:#3200,8486><:f,QCourier New,>Sub Initialize<**>  Dim session As New NotesSession<**>  Dim db As NotesDatabase<**>  Dim view As NotesView<**>  Dim doc As NotesDocument<**>  Set db = session.CurrentDatabase<**>  Set view = db.GetView( "Main View" )<**>  Set doc = view.G
etFirstDocument<**>  <+!>count% = 0<-!><**>  ' this loop works correctly<**>  Do Until doc Is Nothing<**>    
<+!>count% = count% + 1<-!><**>    Set doc = view.GetNextDocument( doc )<**>  Loop<**>  Messagebox( Cstr( count% ) )<**>End Sub<:f>

@Chead@<:R1,0,><:#200,8486>Details: Correcting the script

<:R1,0,><:#400,8486>Since the original script produced a count of one too many documents, why couldn't you just fix the script by setting count% to 0 instead of 1?

<:R1,0,><:#400,8486>Consider the case where there are no documents in the view. The above script returns a count of 0, which is correct. (More?).

@Ahead@<:R1,0,><:#240,8486>About creating a form action script

<:R1,0,><:#400,8486>In this section, you'll create a script that allows users to send mail to the author of any Main Topic document in the database. You'll learn:

@Bullet@<:R1,0,><:#200,8486>How to access and modify items on a document

@Bullet@<:R1,0,><:#200,8486>How to access the document that's currently open on the workspace

@Bullet@<:R1,0,><:#200,8486>How to mail documents

@Bullet@<:R1,0,><:#200,8486>How to use the LotusScript Browser to access help topics

@Bhead title@<:R1,0,><:#220,8486>Creating a form action script

<:R1,0,><:#200,8486>Users can invoke a form action any time a document is displayed with the form.

@Numbered list@<:R1,0,><:#200,8486>Click the Design twisty in the folder pane of the Learning LotusScript database.

@Numbered list@<:R1,0,><:#200,8486>Click Forms.

@Numbered list@<:R1,0,><:#200,8486>Open the Main Topic form.

@Numbered list@<:R1,0,><:#200,8486>Choose Create - Action.

@Numbered list@<:R1,0,><:#200,8486>Give the Action a name, such as "Request more info from author", in the action InfoBox.

@Numbered list@<:R1,0,><:#200,8486>Select the "Request more info from author" action under Define.

@Numbered list@<:R1,0,><:#200,8486>Select Click under Event.

@Numbered list@<:R1,0,><:#200,8486>Type or paste the following script:

@Mono@<:R1,0,><:#5600,8486>Sub Click(Source As Button)<**>  Dim workspace As New NotesUIWorkspace<**>  Dim session As New NotesSession<**>  Dim uidoc As NotesUIDocument<**>  Dim db As NotesDatabase<**>  Dim doc As NotesDocument<**>     
<**>  ' get the currently open document<**>  Set uidoc = workspace.CurrentDocument<**>     
<**>  ' get the current database<**>  Set db = session.CurrentDatabase<**>     
<**>  ' create a new document in the current database<**>  Set doc = New NotesDocument( db )<**>     
<**>  ' set the document's form so it'll be readable as mail memo<**>  doc.Form = "Memo"<**>     
<**>  ' set the new document's Subject equal to the current document's Subject<**>  doc.Subject = uidoc.FieldGetText( "Subject" )<**>     
<**>  ' set the new document's Body<**>  doc.Body = "Please send me more information about this."<**>     
<**>  ' send the new document to the author of the current document<**>  Call doc.Send( False, uidoc.FieldGetText( "From" ) )<**>End Sub

@Chead@<:R1,0,><:#200,8486>Details: Creating a form action script

<:R1,0,><:#400,8486>The script you just created means: "I want to create a new document in the current database, set the value of some of its items, and mail it to the author of the document that's currently open."

<:R1,0,><:#200,8486>The script is commented, so we won't explain each line, but notice:

@Bullet@<:R1,0,><:#600,8486>There is a separate class, NotesUIDocument, that represents only the currently open document on the user's workstation. NotesDocument, on the other hand, represents any document in the database. Each class has  different properties and methods.

@Bullet@<:R1,0,><:#600,8486>Using New with the NotesDocument class actually creates a new document. This behavior is different from that of NotesDatabase, where New does not create a new database but rather creates a NotesDatabase object that represents an already existing database.

@Bullet@<:R1,0,><:#400,8486>The script sets the value of several items on the doc object by treating their names as properties of doc.

@Ahead@<:R1,0,><:#240,8486>About the LotusScript Browser

<:R1,0,><:#800,8486>So far, we've told you what objects, properties, and methods to use in your script. Now let's see if you can figure out where to go from here. Your mission: to find a method that will let you access other documents in a view. You are not, of course, alone i
n your mission. Read on to see how the Browser can help you.

@Bhead title@<:R1,0,><:#220,8486>Using the LotusScript Browser to find Notes methods and properties

@Numbered list@<:R1,0,><:#200,8486>Open your agent.

@Numbered list@<:R1,0,><:#400,8486>Move the slider (located on the right of the programmer's pane) to the center of the screen. You see the Browser in the lower left of the screen.

@Numbered list@<:R1,0,><:#200,8486>Select Product Classes in the drop-down box.

@Numbered list@<:R1,0,><:#200,8486>Double-click a class name. The list of the properties and methods for that class appear.

@Numbered list@<:R1,0,><:#400,8486>Select any class, property, or method and press F1. The Help topic for your selection appears. Use the Browser and Help to find a method that will allow you to access more documents in the view.

@Bhead title@<:R1,0,><:#220,8486>Using the LotusScript Browser to find LotusScript calls

<:R1,0,><:#200,8486>Next, use the Browser to figure out how to write a loop.

@Numbered list@<:R1,0,><:#200,8486>Select LotusScript Language in the drop-down box.

@Numbered list@<:R1,0,><:#200,8486>Double-click Loops.

@Numbered list@<:R1,0,><:#200,8486>Select any loop construct and press F1. The Help topic for your selection appears.

<:R1,0,><:#400,8486>Use the Browser and Help to find a loop construct that will let you access all the documents of a certain section.

>

[Embedded]
00058776
