Showing posts with label Lotuscript. Show all posts
Showing posts with label Lotuscript. Show all posts

Friday, 14 November 2014

Add Disclaimer to Mail Signature in IBM SmartCloud Notes (Custom Implementation)

Requirement:

A company disclaimer is required to be added to all the Emails sent across the organization and outside using SmartCloud Notes Client and iNotes.

Challenge:

SmartCloud Notes doesn’t support functionality of Message Disclaimer.

 

Solution:

This solution is a work around and not really a Cloud based integration.

We’ll be using a LotusScript Agent to modify the Mail Signature for Notes Client, iNotes – Plain Text and iNotes – Rich Text and append the Disclaimer for all users.

Assumption:

The Administrator has access to all the MailFiles in SmartCloud Notes via Template Modification.

 

Code:

Option Public
Option Declare

Const DISCLAIMER = |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Disclaimer :
This e-mail and any attachments thereto are intended for the sole use of the recipient(s) named above and may contain information that is confidential and/or proprietary to the ABC Pvt. Ltd. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication, or dissemination in any form) by persons other than the intended recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Sub Initialize
    Dim s As New NotesSession
    Dim docP As NotesDocument
    Dim db As NotesDatabase
    Dim dociNotes As NotesDocument
    Set db = s.CurrentDatabase
    Set docP = db.GetProfileDocument("CalendarProfile")
    Set dociNotes = db.Getprofiledocument("iNotesProfile")
    If docP.SignatureInserted Then 'Avoid repeated insert of signature
        'Plain Text Signature
        docP.Signature_1 = docP.Signature_1(0) & Chr(10) & DISCLAIMER
        'HTML iNotes Signature
        dociNotes.HTMLSignature = dociNotes.HTMLSignature(0) & Chr(10) & DISCLAIMER
        'Notes RichText Signature
        Dim rtItem As New NotesRichTextItem(docP, "Signature_Rich")
        Call rtItem.appendtext(DISCLAIMER)
        docP.SignatureInserted = True
        Call docP.Save(True,False)
        Call dociNotes.save(True, False)
    End If
End Sub

Friday, 27 April 2012

Integrating with IBM Lotus Symphony from Java/.Net/XPages applications

Following link contains the sample code to work with IBM Symphony via COM object. The same object can be called from Visual Studio as well. IBM LOTUS SYMPHONY ON MAC

http://www-10.lotus.com/ldd/lswiki.nsf/dx/Lotus_Notes_and_Lotus_Symphony_and_COM_Objects_How_to_Create_your_Lotus_Symphony_Integration_for_Clients_without_the_Embedded_Client

Also, since Lotus Symphony is built on top of OpenOffice and supports ODF formats. I would suggest using ODF specific packages available on OpenOffice site. The output will be rendered correctly on Symphony.
http://www.openoffice.org/udk/common/man/tutorial/office_automation.html
http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide
http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html

There are Java and Lotuscript Toolkit available for Symphony related development:
http://www.johndavidhead.com/jhead/johnhead.nsf/dx/introduction-to-the-lotus-symphony-lotusscript-api

The Lotuscript code which is very near to VB code or else can call the Java classes directly from the .Net code.
http://stackoverflow.com/questions/5928200/call-java-method-from-api-in-net


If someone wants to extend Lotus Symphony functionality, you can write extensions as well:
http://www-10.lotus.com/ldd/lswiki.nsf/dx/10272008093319AMDDRMDU.htm

Wednesday, 11 April 2012

Create Report of Latest Notes Client Installed on Users in the Domain

 

One of our customer asked to generate a report of current Lotus Notes client version installed on user’s machines across the country. Fortunately, Lotus Notes Client store the information about the Client Installation in Person document. There is a field called ClntBld which contains all the builds that a particular person has installed on his machine. However, this multi value field doesn’t store these values in expected sequence. The latest information can be at any position of multi valued field.

Therefore, the below mentioned approach first determines the latest date of Build being added to person document from ClntDate field, then retrieves the relative information from ClntBld field.

Use this formula for a view column to get the latest build from Addressbook:

lst := @Sort(ClntDate;[Descending]);
ClntBld[ @Member(@Text(lst[1]); @Text(ClntDate))];

image