Looking for Ideas on how to do

  • Thread starter Thread starter Annette
  • Start date Start date
A

Annette

I'm not sure where to start on this part of the project so I'm asking for
help. I have a spreadsheet with daily variable information. This is
information is distributed to offices through our area and is manually copy
and pasted into an email (outlook 2000) the information that pertains to
that office. I'm thinking this can be automated and I studied Ron DeBuin
website and see there are available macros for sending ranges ... but I'm
getting stumped on how to do this since the information changes daily.

I have 20 offices ... anyone of them could get information from 1 to 40
lines of information. (There will only be three columns of information per
line standard.)

Grrrr ... I just need a starting point here .. and I'm not seeing it.
Thanks for any suggestions.

Annette
 
Here is some code that may get you going.

Option Explicit

Dim ol, MailSendItem, olns, olMailItem
Dim today As Date
Dim mySubj, myAddr, myBody, myAttachments
Dim myFile

Sub NewMail()
Set ol = CreateObject("Outlook.Application")
Set MailSendItem = ol.CreateItem(olMailItem)
Set olns = ol.GetNamespace("Mapi")

mySubj = Range("B2")
myAddr = Range("D2")
myBody = Range("A1")
With MailSendItem
.Subject = mySubj
.Body = myBody
'.htmlbody = "<HTML><H2>My HTML page.</H2><BODY><IMG
SRC=""WBHats.jpg""></BODY></HTML>"
.To = (e-mail address removed)
.attachments.Add "C:\temp\wb_logo\WBHats.jpg"
'.CC = (e-mail address removed)
'.Attachments.Add "C:\temp\011302.zip"
.Send
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top