Отправляет email-рассылки с помощью сервиса Sendsay

Бюллетень "Lotus Notes CodeStore"

  Все выпуски  

Бюллетень "Lotus Notes CodeStore" No 96 от 2008-10-31


Рассылку ведет: Программист на Lotus NotesLotus CoderВыпуск No 96 от 2008-10-31
рассылка о программировании на Lotus Notes/Domino
Обсуждения на форумах, блогах. Примеры программного кода на LotusScript,@formula, Java

рассылка:выпускархивлентаблогсайт

Бюллетень "Lotus Notes CodeStore" Выпуск 13 от 21.04.2008

comp.soft.prog.lotuscodesrore

CodeStore. Примеры кодов

Sub Initialize
On Error Goto ErrorHandler
Dim s As NotesSession
Dim ws As New NotesUIWorkspace
Dim currentDb As NotesDatabase
Dim uiView As NotesUIView
Dim view As NotesView
Dim coll As notesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
Dim field As String, newValue As String, msg As String, action As String
Dim items As Variant
Const kActionRemove = "remove"
Const kActionReplace = "replace"
Const kActionNone = ""
Const kMsgNoActionDone = "No changes made." ' setup
Set uiView = ws.CurrentView
Set view = uiView.View
Set coll = view.AllEntries ' get a list of all items
Set doc = coll.GetFirstEntry.Document
Forall item In coll.GetFirstEntry.Document.items
items = items & item.name & ","
End Forall ' tighten up the list
items = Split(items, ",")
items = Fulltrim(items)
items = Arrayunique(items) ' find out what action we are doing
If Msgbox("Click 'No' to replace values or to exit.", MB_YESNO, "Are you going to REMOVE a field?") = IDYES Then
action = kActionRemove
Elseif Msgbox("Click 'No' to exit.", MB_YESNO, "Then you must be REPLACING data in a field?") = IDYES Then
action = kActionReplace
Else
action = kActionNone
End If ' prompt for the item to change
If action <> kActionNone Then field = ws.Prompt(PROMPT_OKCANCELEDITCOMBO, "Please select the field you wish to " & action, "or enter a field manually.", "", items) Select Case action
Case kActionRemove
' verify the action
If Msgbox("Click 'No' to cancel.", MB_YESNO, "Are you sure you want to REMOVE " & field & " from all document in this view?") = IDYES Then
' loop through all docs in view and remove the item in question
Set entry = coll.GetFirstEntry
While Not entry Is Nothing
Set doc = entry.Document
' Call doc.RemoveItem(field)
' Call doc.Save(True,False)
Set entry = coll.GetNextEntry(entry)
Wend
msg = "Finished removing '" & field & "' from all documents at " & Time()
Else
msg = kMsgNoActionDone
End If
Case kActionReplace
If Msgbox("This might take a few minutes as each document will be examined.", MB_YESNO, "Do you want see all the current values or type one in manually?") = IDYES Then
' grab all current entries
items = ""
Set entry = coll.GetFirstEntry
While Not entry Is Nothing
Set doc = entry.Document
items = items & doc.GetItemValue(field)(0) & ","
Set entry = coll.GetNextEntry(entry)
Wend ' tighten up the list
items = Split(items, ",")
items = Fulltrim(items)
items = Arrayunique(items) ' prompt for a new value
newValue = ws.Prompt(PROMPT_OKCANCELEDITCOMBO, "Please select the value you want to use", "or enter a value manually.", "", items)
Else
' prompt for a new value
newValue = Inputbox("Please enter the new value for '" & field & "")
End If ' verify the action
If Msgbox("Currently setting '" & field & "' = '" & newValue &"'.", MB_YESNO, "Are you sure you want to set " & field & " = " & newValue & " for all documents in this view?") = IDYES Then
' Call coll.StampAll(field, newValue)
msg = "Finished stamping all documents with " & field & " = " & newValue & " at " & Time()
Else
msg = kMsgNoActionDone
End If
Case kActionNone
msg = kMsgNoActionDone
End Select ' fall through to print a message
ErrorHandler: If msg = "" Then msg = "Your action did not complete successfully. Please investigate. (" & Now() & ")" Msgbox msg
Exit Sub ' gets around "No Resume" error
End Sub
[<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>]
Еще примеры:
Больше кодов на сайтах:

Форумы.Свежи темы и обсуждения

Мы у себя долго мучались в конторе с AT.
Вопросы размещаются на сгенерированных AT страница
Мы у себя долго мучались в конторе с AT.
Вопросы размещаются на сгенерированных AT страница
Добрый день, просветите пожалуйста неопытного человека!
Возникла проблема. После переустановки системы, база неправильно отображает значения на русском. Что можно сделать?
Добрый день, просветите пожалуйста неопытного человека!
Возникла проблема. После переустановки системы, база неправильно отображает значения на русском. Что можно сделать?
условно говоря, на форме xform есть два поля:
1. unids - editable - список unid'ов
2. valves - computed - , который по элементам первого поля берёт в документах ну ккое-нить значение


после чего програмно создаётся док (NotesDocument), заполняется его параметры form (="xform") и unids.
так вот, как мне сделать так, чтобы в этот документ автоматически добавилось поле valves, вычисленное на основании добавленного unids

желательно, конечно, не использовать UIDocument (compose - refresh - save), может есть какой-либо другой метод?



напоследок - создавать прийдётся около 3000 подобных документов (ну, не подобных, посложнее конечно)
Здравствуйте!
Как можно перенести почтовые базы пользователя с одного сервера на другой (в одном домене)? Как правильно это делать?
Спасибо Всем!
Интересные темы:
Список форумов:

Tips. Советы

A funny thing happened last night. There I was sprawled over the sofa, minding my own business, dividing my time between the laptop and Silent Witness, when Karen pipes up:

"I've got something to say to you", she says.

This normally means the same as "We need to talk". Inside I'm thinking "Oh God, what have I done now!?" but simply ask what's on her mind.

"Ray... Ozzie... Clouds", she replies.

"Have you been watching the news?" I ask her.

Having watched this clip from BBC online earlier in the day I think I knew what she was talking about. Turns out she'd seen it on the TV and thought she'd try and impress me or, at least, feign an interest in whatever it is she thinks I do. What she didn't realise was who Ray Ozzie is or the relevance of what he's done in the past to my life now.

"Are you asking because you know he was the man who invented Lotus Notes?", I asked.

"No, I didn't know that. Is he your hero then?", she replied. To which I replied "Hmm, not really" and we left it at that. Karen still non-the-wiser as to exactly what I do.

It was funny as, when I'd been watching the interview earlier, I couldn't help but look at him and wonder how different my life would be had Lotus Notes not come about. But hey, that's fate for you and I'm not going to question whether my life would be better or worse. Fact is I'm happy where I am and shouldn't ever take that for granted.

Click here to post a response

This LotusScript code creates an action button that, when applied to any view or folder in Lotus Notes mail files, makes mail file management easy. Using a single action button, Lotus Notes Domino users can easily manage their mail files, investigate file sizes, get quota details, delete attachments and empty message trash bins.

Еще советы:
Смотри советы на сайтах:

Блоги. Что обсуждают и пишут

Author: Ondrej Kostruh
Tags: lotusscript dxl NotesDXLImporter
Idea:
I think it may be useful that NotesDXLImporter can set output to a NotesDocumentCollection. This way one can create notes documents in collection in memory without saving then to nsf.
It allows some simple operations over collection and can decide if they (docs) should be saved and how.

Author: Richard Hogan
Tags: designer notes client mail
Idea:
I'd like to be able to use a Custom Button on a Toolbar to jump me to a deeply nested folder where I can select a file for attaching to an outgoing email.    @command([EditInsertFileAttachment]; file; compress)  would be ideal if  file could be "c:\folder1\folder2\folder3\*.xls"  (ie. if could specify a wildcard which would then cause an open file dialog to appear!!!)
eg.
@command([EditInsertFileAttachment]; "h:\Corporate\Policies\Product1\*.xls"; 0 )      or 
@command([EditInsertFileAttachmetn]; "h:\Corporate\Policies\Product1\"; 0;  "*.xls" )   where we specify a filter
 

Author: daniele grillo
Tags: Thumbnail images attachments native
Idea:
For me it's a nice feature to implements a native LS code for manage a thumbnails of attachments images, so that I can't use other freeware/shareware tool for this.
Another feature is that the attach images are visibile in thumbnaling in the view column.

Еще записи:
Интересные блоги специалистов:

Статьи и Документация

Using the 7.x Domino Administrator to create a new user with the default options fails with the error "FAILED: File does not exist: server/ou mail7.NTF".
When you right-click on an image attachment and choose to open, you receive an "unknown viewer failure" error.
The SSL certificate in your Domino server's key ring is close to expiration. You used a third-party Certificate Authority (CA) to stamp the SSL certificate. Can you use the existing key ring to renew the SSL certificate?
In Notes/Domino, the Hebrew language version of the Standard mail template in the form "Unprocessed Notices" has incorrect wording.
In Notes, when you paste Hebrew characters from Excel they do not appear as expected when using Paste, Paste Special > Picture, or the Paste Special > Excel option.
You have set up automatic archiving of mail older than one year using an Explicit Archiving policy. When attempting to archive, you receive the error "LookupHandle: null handle on remote server".
When attempting to rename a Room or Resource you receive the following error: "New name should contain the same number of forward slashes '/' as Current Name".
Recommended Lotus Domino® Hotfixes for Lotus Notes® Traveler
You have checked "In the future, always remove calendar entry from Inbox" when removing a calendar entry from the Inbox view. Where is this setting stored?
This document is a collection of Lotus® Notes® Traveler MustGather problem reporting and troubleshooting documents. This document may be used as a starting point for obtaining information about a specific problem when using Lotus Notes Traveler.
The icon associated with an exe attachment is lost when the path plus attachment name is 76 characters or greater.
Large embedded images are not automatically resized by the embedded Notes Browser the way that they are in third party browsers when a preference to do so is enabled.
PIM Sync and Address Book backup Don't assume that Blackberry device address book is backed up to the server via wireless just because it is synchronized to a user's PAB. Some important fields are no
This technote describes how to configure your Domino server for secure SMTP sessions using the STARTTLS extension for inbound and outbound SMTP mail.
Explanation: Beginning in with Domino 8.5 there are many more files installed under 'domino' directory of the the data directory. Some of contents, like 'domino/js', have been blocked from access via
Также почитатай:
Найти документацию можно на сайтах:

В избранное