Lotus Notes — рабочий инструмент программиста.

Обсуждения программирования на Lotus Notes/Domino

PromptMailTemplateUsed — Get information about the template your mail database inherits from.

leave a comment »

[<pre>
Sub PromptMailTemplateUsed()
‘Written by John Smart John.Smart@GreyDuck.com
‘Submitted to OpenNTF on 30 Oct 2008
http://www.openntf.org/projects/codebin/codebin.nsf/CodeByDate/660570790A3B977B862574F2006E3E4F
Dim db As New NotesDatabase("", "")
Dim doc As NotesDocument
Dim strMsg As String
Dim strTemplateName As String
Dim strTemplateServerName As String
Dim strTemplateFileName As String Print "Finding your email database…"
Call db.OpenMail() Print "Verifying that your email database inherits from a template…"
strTemplateName = db.DesignTemplateName
If Len(strTemplateName) = 0 Then
Error 1000, "Your mail database doesn’t inherit it’s design from a template."
End If Print "Getting information about where your mail template inherits from…"
Set doc = db.GetDocumentByID("FFFF0010") ‘icon design element. Thanks to http://www.nsftools.com/tips/NotesTips.htm#defaultelements ‘Get template information stored in the icon design element. Thanks to http://www.notesninjas.com/#TemplateFileName
strTemplateServerName = doc.GetItemValue("$TemplateServerName")(0)
strTemplateFileName = doc.GetItemValue("$TemplateFileName")(0) strMsg = |Design Template Name: | + strTemplateName + |
Server: | + strTemplateServerName + |
File Path: | + strTemplateFileName + | NOTE: File Path is based on the server’s operating system, so a File Path of "/local/notes/data/mail8.ntf" would imply that your template is probably "mail8.ntf" in the root data directory on your server.| Print ""
Messagebox strMsg, 0, "Hints on where to find your mail template."
End Sub
</pre>]

Published by  Published by xFruits

Original source : http://www.openntf.org/projects/codebin/codebin.ns…

Written by lotusnotes

10 января, 2009 в 12:08

Опубликовано в Lotus Notes

Оставьте комментарий