CreateView with a view template

Set notesView = notesDatabase.CreateView( [ viewName$ ] [, selectionFormula$ ] [, formatNotesView ] )

Parameters

formatNotesView

NotesView. Optional. An existing view from which the new view is copied.

I cannot succeed to create a view as copy of an existing view, pls HELP!

Subject: CreateView with a view template

Please describe the type of failure you are experiencing, including the exact text any error messages you see and when you see them. Please show the relevant piece of code.

Subject: CreateView with a view template

You could check your template.This should be a notesview.

So, something like:

DIM viewTemplate as notesView

Set viewTemplate = db.(“”)

Then use viewTemplate in your createview…

Hope this helps…

Subject: RE: CreateView with a view template

This code (in Mail Template) to see only encrypted emails works for me:

Dim s As New notessession

Dim db As notesdatabase

Dim view As notesview

Dim viewTemplate As notesView

Set db = s.currentdatabase

Set viewTemplate = db.getview(“($All)”)

Set view = db.CreateView({(Encrypted)}, {SELECT Encrypt=“1” | @IsAvailable(SecretEncryptionKeys)}, viewTemplate)