18.01.2013 Views

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

We get the Environment value in NOTES.INI and store it in seqNo.<br />

seqNo = session.GetEnvironmentValue("SeqNo")<br />

If there is no seqNo in NOTES.INI, we create it and set it to 1, otherwise we<br />

increase the Environment value by one.<br />

If Isempty(seqNo) Then<br />

Else<br />

Call session.SetEnvironmentVar("SeqNo", 1)<br />

seqNo = seqNo + 1<br />

Call session.SetEnvironmentVar _<br />

("SeqNo", Cint(seqNo))<br />

End If<br />

We print out the Environment value.<br />

Messagebox session.GetEnvironmentValue("SeqNo")<br />

We close the Notes session using the Close method.<br />

Call session.Close<br />

Chapter 6: Accessing Notes Sessions 121

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!