Wednesday, May 15, 2013

Meanings of these Words


Do you know the meanings of these words?


  • News = North East West South
  • Chess = Chariot, Horse, Elephant, Soldiers
  • Cold = Chronic Obstructive Lung Disease
  • Joke = Joy of Kids Entertainment
  • Aim = Ambition in Mind
  • Date = Day and Time Evolution
  • Eat = Energy and Test
  • Tea = Taste and Energy Admitted
  • Pen = Power Enriched in Nib
  • Smile = Sweet Memories in Lips Expression
  • Bye = Be with your Everytime


Monday, May 13, 2013

AutoSend the mail from excelsheet


Create a Action Button and copy paste following Lotus Script.
When you click on action button it will open excel file.. add following columns and once your are done click "OK" Prompt button...

This is select individual rows and send mail.

Columns 1: To
Columns 2: Subject
Columns 3: Body Content

Programming Code:


Sub Click(Source As Button)
on error goto ErrorHandling

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim richStyle As NotesRichTextStyle
Dim color As NotesColorObject

Dim xlApp As Variant
Dim xlsheet As Variant
Dim ARangeValue As Variant

Dim I As Integer
Dim c As Integer 
Dim j As Integer
Dim answer As Integer

Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
Set richStyle = session.CreateRichTextStyle
Set color = session.CreateColorObject
color.NotesColor = 240

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.add

Set xlsheet = xlApp.Workbooks(1).Worksheets(1)
xlsheet.Activate

Messagebox " Copy the data in the excelsheet, Once you click 'OK' mail will sent to the respected users."


c=65
While Not xlsheet.Range(Chr(c) & "1").Value = ""
i=2

doc.Form = "Memo"
doc.SendTo = xlsheet.Range("A" & Trim(Str(i + 1))).Value
doc.Subject = xlsheet.Range("B" & Trim(Str(i + 1))).Value

Dim richText As New NotesRichTextItem(doc, "Body")

Call richText.AddNewline(1)

richStyle.Bold = True
richStyle.NotesColor = COLOR_BLUE
richStyle.FontSize = 18

Call richText.AppendStyle(richStyle)
Call richText.AppendText("Title with Tex Style")

richStyle.Bold = False
richStyle.FontSize = 10
richStyle.NotesColor = COLOR_BLACK

Call richText.AppendStyle(richStyle)
Call richText.AddNewline(2)
Call richText.AppendText("Body Contents for the mail....")
Call doc.Save(True, False)
Call doc.Send( False ) 

i = i + 1
Wend

Messagebox "Auto Mail send Process is Complited"

Exit Sub
ErrorHandling:
Messagebox  Error

End Sub