Email Data from Excel through Email. 
Author Message
 Email Data from Excel through Email.

Is there away to put data thats on a spreadsheet on an
email and have it send "On" an email, not as a spreadsheet.

So what i have is a spreadsheet with a lot of orders and
order completion times.  I have this data Autofiltered by
column K.

So Basically what i need some code that will go to A4,
Select the Current Region and Copy it, and send just that
information in an email, and the subject line would read
something like "Timeliness Data"

Is this Possible?

Thanks,
Nick



Tue, 28 Dec 2004 00:06:23 GMT  
 Email Data from Excel through Email.
I'd probably do this with a named range in the worksheet and format the
message as HTML so you get a nice table, something like this (code hasn't
been tested -- your mileage may vary).

    Set objRange = ActiveWorksheet.Range("TimelinessData")
    intRowCount = objRange.Rows.Count
    intColCount = objRange.Columns.Count
    If intRowCount > 0 and intColCount > 0 Then
        Set objApp = CreateObject("Outlook.Application")
        Set objMsg = objApp.CreateItem(olMailItem)
        strBody = "<table>"
        For I = 1 To intRowCount
            strBody = strBody & "<tr>"
            For J = 1 to intColCount
                strBody = strBody & "<td>" & _
                                objRange.Cells(I, 3) & "</td>"
            Next
            strBody = strBody & "</tr>"
        Next
        strBody = strBody & "</table>
        objMsg.HTMLBody = strBody
        objMsg.Subject = "Timeliness Data"

        objMsg.Send
    End If

Add formatting tags and attributes to each row or column entry if you like.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming - coming Fall 2002
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> Is there away to put data thats on a spreadsheet on an
> email and have it send "On" an email, not as a spreadsheet.

> So what i have is a spreadsheet with a lot of orders and
> order completion times.  I have this data Autofiltered by
> column K.

> So Basically what i need some code that will go to A4,
> Select the Current Region and Copy it, and send just that
> information in an email, and the subject line would read
> something like "Timeliness Data"

> Is this Possible?

> Thanks,
> Nick



Fri, 31 Dec 2004 04:17:59 GMT  
 Email Data from Excel through Email.
The problem i have with this is that i get an Object Required error.
What should i change?

Nick


Quote:
> I'd probably do this with a named range in the worksheet and format the
> message as HTML so you get a nice table, something like this (code hasn't
> been tested -- your mileage may vary).

>     Set objRange = ActiveWorksheet.Range("TimelinessData")
>     intRowCount = objRange.Rows.Count
>     intColCount = objRange.Columns.Count
>     If intRowCount > 0 and intColCount > 0 Then
>         Set objApp = CreateObject("Outlook.Application")
>         Set objMsg = objApp.CreateItem(olMailItem)
>         strBody = "<table>"
>         For I = 1 To intRowCount
>             strBody = strBody & "<tr>"
>             For J = 1 to intColCount
>                 strBody = strBody & "<td>" & _
>                                 objRange.Cells(I, 3) & "</td>"
>             Next
>             strBody = strBody & "</tr>"
>         Next
>         strBody = strBody & "</table>
>         objMsg.HTMLBody = strBody
>         objMsg.Subject = "Timeliness Data"

>         objMsg.Send
>     End If

> Add formatting tags and attributes to each row or column entry if you like.
> --
> Sue Mosher, Outlook MVP
> Outlook and Exchange solutions at http://www.slipstick.com
> Author of
>      Microsoft Outlook Programming - coming Fall 2002
>      http://www.slipstick.com/books/jumpstart.htm



> > Is there away to put data thats on a spreadsheet on an
> > email and have it send "On" an email, not as a spreadsheet.

> > So what i have is a spreadsheet with a lot of orders and
> > order completion times.  I have this data Autofiltered by
> > column K.

> > So Basically what i need some code that will go to A4,
> > Select the Current Region and Copy it, and send just that
> > information in an email, and the subject line would read
> > something like "Timeliness Data"

> > Is this Possible?

> > Thanks,
> > Nick



Tue, 11 Jan 2005 03:31:06 GMT  
 Email Data from Excel through Email.
Which line triggers that error? Did you create a named range?

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming - coming September 2002
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> The problem i have with this is that i get an Object Required error.
> What should i change?

> Nick




Quote:
> > I'd probably do this with a named range in the worksheet and format the
> > message as HTML so you get a nice table, something like this (code
hasn't
> > been tested -- your mileage may vary).

> >     Set objRange = ActiveWorksheet.Range("TimelinessData")
> >     intRowCount = objRange.Rows.Count
> >     intColCount = objRange.Columns.Count
> >     If intRowCount > 0 and intColCount > 0 Then
> >         Set objApp = CreateObject("Outlook.Application")
> >         Set objMsg = objApp.CreateItem(olMailItem)
> >         strBody = "<table>"
> >         For I = 1 To intRowCount
> >             strBody = strBody & "<tr>"
> >             For J = 1 to intColCount
> >                 strBody = strBody & "<td>" & _
> >                                 objRange.Cells(I, 3) & "</td>"
> >             Next
> >             strBody = strBody & "</tr>"
> >         Next
> >         strBody = strBody & "</table>
> >         objMsg.HTMLBody = strBody
> >         objMsg.Subject = "Timeliness Data"

> >         objMsg.Send
> >     End If

> > Add formatting tags and attributes to each row or column entry if you
like.



> > > Is there away to put data thats on a spreadsheet on an
> > > email and have it send "On" an email, not as a spreadsheet.

> > > So what i have is a spreadsheet with a lot of orders and
> > > order completion times.  I have this data Autofiltered by
> > > column K.

> > > So Basically what i need some code that will go to A4,
> > > Select the Current Region and Copy it, and send just that
> > > information in an email, and the subject line would read
> > > something like "Timeliness Data"

> > > Is this Possible?

> > > Thanks,
> > > Nick



Tue, 11 Jan 2005 04:07:16 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. sending customized emails to emails in an excel spreadsheet

2. Excel Data on Email

3. Sending Excel Data Through Email

4. Outlook VBA - open Excel, read in two fields, send email with these, close excel

5. Sending email to more then one email

6. Problem emailing from VB/Access when notes is email server

7. Send a email to email-address with netscape ???

8. Send email from Acc97 to Lotus notes email.

9. VBA Send Email with specific Email Account

10. Modify EMail properties on a per automation generated EMail

11. getting email senders Actual Email address

12. getting email senders actual email address

 

 
Powered by phpBB® Forum Software