Design element Properties

I use the GetForm option to retreive a particular subforms. Example:

Dim form As NotesForm

Set form = db.GetForm(“Subform Name”)

How can I retreive this designs NoteID, unid and other properties?

Should I be trying to get this information in another way?

Thanks in advance

Subject: Design element Properties

For some design elements (well, most, actually), it’s easier to build a NotesNoteCollection that’s as restrictive as you can make it, then cycle though it, getting NotesDocuments bu NoteID until you find the one with the $Title you’re looking for.

Subject: RE: Design element Properties

Thought I might have to do something like that. Thanks for the direction, boy did I need it :slight_smile:

Subject: RE: Design element Properties

You can also avoid any loops, if you get the unid via the NotesURL property:

Sub Initialize

Dim session As New NotesSession

Dim form As NotesForm

Dim doc As NotesDocument

Set db = session.CurrentDatabase

Set form = db.GetForm("MySubForm")

xurl = form.NotesURL

xp = Instr( xurl, ".nsf" )

xunid = Mid( xurl, xp+5, 32)

Set doc = db.getdocumentbyunid( xunid )

formunid = doc.UniversalID

formtitle = doc.~$Title(0)

formhistory = doc.~$UpdatedBy

formdesignerversion = doc.~$DesignerVersion(0)

End Sub

Subject: RE: Design element Properties

Cool – I’d assumed (wrongly, it appears) that subforms weren’t callable by URL.