Howto create a database from a template through LS?

Hiya

I wonder how I can create a database and have it inherit a template?

this example here is slightly modified code from the help docs, but it does not say how to import a template…

Dim db As New NotesDatabase( "scripto1", "test.nsf" )

If db.IsOpen Then

	Messagebox( "The database test.nsf already exists." )

Else

	Messagebox( "Creating the database test.nsf...")

	Call db.Create( "scripto1", "test.nsf", True )

	db.Title = "Test DB"

End If

Subject: Howto create a database from a template through LS?

Lookup “CreateFromTemplate” in the designer help.

Dim template As New NotesDatabase( “Anchorage”, “discuss.ntf” )

Dim brandNewDb As NotesDatabase

Set brandNewDb = template.CreateFromTemplate ( “Juno”, “suggest.nsf”, True )

brandNewDb.Title = “Suggestions for Giving Campaign 1996”

Call brandNewDb.GrantAccess(“-Default-”, ACLLEVEL_READER)

Subject: RE: Howto create a database from a template through LS?

Thx,that works…Now I just have to find out how to set a few things like what the master template should be in the newly created database… :slight_smile:

I search for create database in the help but the CreateFromTemplate method didn’t show up.