How to update attached notes.ini parameters

Hi AllI have a generic notes.ini which is attached to template document and I have a agent which will create a client document for each user and attach the notes.ini from template document, but i want to change some of the parameters of notes.ini i.e

• MailServer=Hello (mail server name)

• Location=Office (Network)

before it attach it to client document.

Please let me know if you want me to explain more.

Thanks

Subject: How to update attached notes.ini parameters.

So, you are saying that there already is a file (NOTES.INI) attached somewhere which serves as a template as it gets sent to each new user. Right? Is it already successfully being sent to new users? Are you simply wanting to change the file being used as a template? If so, go find the document (or form) where the current INI file is, edit it, save it, delete the existing attachment, attach the new one, and save the doc (form).

Subject: RE: How to update attached notes.ini parameters.

Let me explain more.I have template form which have which have four rich text field and 1st field contain generic notes.ini means no user name, mail server info, 2nd field contain personal address book, 3rd field bookmark.nsf and 4th field desktop.dsk. I have one ohter form name client which will be created for each user and attched notes.ini, names.nsf, desktop6.ndk and bookmark from template document, before it will attched the notes.ini and names.nsf i want to update the notes.ini and names.nsf with user name and mail server and some other parameter.

Here is script so for, but when I am tring to open the personal address book after attaching it to client it is not opening the personal address book.

Dim session As New notessession

Dim view As notesview

Dim doc As NotesDocument

Dim db As NotesDatabase



Dim cnotesini As notesrichtextitem

Dim cpaddbook As notesrichtextitem

Dim cbookmarkfile As NotesRichTextItem

Dim  cdesktop6file As NotesRichTextItem



Dim tnotesini As notesrichtextitem

Dim tpaddbook As notesrichtextitem

Dim tbookmarkfile As NotesRichTextItem

Dim tdesktop6file As NotesRichTextItem



Set db = session.CurrentDatabase

Set view = db.GetView("Clientinfo")

Set doc = view.GetFirstDocument



Dim tempview As NotesView

Set tempview = db.GetView("template")

Dim tempdoc As NotesDocument

Set tempdoc = tempview.GetFirstDocument

’ Call tempdoc.copyallitems(doc)

While Not doc Is Nothing 

	If doc.HasItem("CBookmarkFile") Then

		Set cbookmarkfile = doc.GetFirstItem("CBookmarkFile")

	Else

		Set cbookmarkfile = doc.CreateRichTextItem("CBookmarkFile")

	End If

	

	If doc.HasItem("CDesktop6File") Then

		Set cdesktop6file = doc.GetFirstItem("CDesktop6File")

	Else

		Set cdesktop6file= doc.CreateRichTextItem("CDesktop6File")

	End If

	

	If doc.HasItem("CNotesini") Then

		Set cnotesini = doc.GetFirstItem("CNotesini")

	Else

		Set cnotesini = doc.CreateRichTextItem("CNotesini")

	End If

	

	If doc.HasItem("CPAddBook") Then

		Set  cpaddbook = doc.GetFirstItem("CPAddBook")

	Else

		Set  cpaddbook = doc.CreateRichTextItem("CPAddBook")

	End If

	

	Set tbookmarkfile=tempdoc.GetFirstItem("TBookmarkFile")

	Set tdesktop6file=tempdoc.GetFirstItem("TDesktop6File")

	Set tnotesini=tempdoc.GetFirstItem("TNotesini")

	Set tpaddbook=tempdoc.GetFirstItem("TPAddBook")

	

	Call tbookmarkfile.CopyItemToDocument( doc, "CBookmarkFile" )

	Call tdesktop6file.CopyItemToDocument( doc, "CDesktop6File" )

	Call tnotesini.CopyItemToDocument( doc, "CNotesini" )

	Call tpaddbook.CopyItemToDocument( doc, "CPAddBook" )

	

	Dim namesdb As New notesdatabase("","")

	Dim namesview As notesview

	Dim namesdoc As NotesDocument  		

	Call namesdb.Open("",doc.CPAddBook)

	If namesdb.isOpen Then

		namesdb.Title="Personal Address Book"

		Set namesview = namesdb.GetView("Adva_nced\Locations")

		Set namesdoc = namesview.GetFirstDocument

		namesdoc.ImailAddress = "test1"

		namesdoc.MailServer = "test2"

		namesdoc.MailFile = "test3"

		Call namesdoc.save(True, False)

	End If

	

	

	Call doc.Save(True,False)

	Set doc = view.getnextdocument(doc)

Wend