Sending cell contents thru lotus notes automatically

N

nuclearjack

At work, every hour on the hour. I take the contents of certain cell
and paste them into notepad and then copy them in to a lotus note
stationary. This is the only way that I have found to make sure that i
goes out as plain text, so that they can be emailed to several cel
phones as text msgs. I would like to automate this process.

This process is also used with several different pages. So I would nee
something that can be easily modified as I have to send about 1
different pages every hour to different people.

Also not sure if this will affect anything but we also have tw
sessions of lotus notes running at a time. An individual and a dep
email. The stationary is in the dept session

I think that if it is possible for something to grab certain cells whe
the contents of one of these cells changes would be the starting point
 
J

jeff

Hi,

Here's some code to put into Outlook which opens an
Excel file, gets the value of B12 and mails it to
yourself. Just put in the proper looping through your
mailing list with other sheets/values, and figure
out a timer to fire this off each hour and you're
sitting easy!!

jeff

Public ExcelString As String
Sub DoMail()
LaunchExcel
LaunchMail
End Sub

Sub LaunchMail()
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)

myitem.To = "NuclearJack"
myitem.Subject = "Test of AutoMail"
myitem.Body = ExcelString

'myitem.Display

myitem.Send

End Sub
'Launch Excel with CreateObject
Sub LaunchExcel()
Dim xLApp 'As Excel.Application
Dim xLSheet 'As Excel.Worksheet
Set xLApp = CreateObject("Excel.Application")
If xLApp Is Nothing Then
MsgBox "Could not create Excel Application",
vbCritical
Exit Sub
End If
xLApp.workbooks.Open "C:\MailTest.xls"
'xLApp.workbooks.Add
Set xLSheet = xLApp.Sheets(1)
xLSheet.Name = "Outlook CreateObject Example"
'Make the Excel Application window visible
'xLApp.Visible = True
ExcelString = xLSheet.Range("B12").Value
'MsgBox "ExcelString = " & ExcelString

End Sub
 
Top