Weekend Forum

Joe sent an Excel question to me in a beautifully formatted html email. I’d like to take that html and paste it here, but I don’t know how to get to it. How do you get the raw html out of an Outlook mail message?

This weekend I’ll be working on an Access project, watching football, and eating hamburgers with my visiting uncle. How about you?

Posted in Uncategorized

17 thoughts on “Weekend Forum

  1. Control+F2 doesn’t work in Outlook – some message about print preview. But you inspired me to do another Google search and I found the answer. Open the message, right click, choose View Source. “Source” was the keyword I was missing in previous searches.

    MS needs almost 400 lines of html to make a 6×10 table, and it didn’t render properly when I pasted it into WordPress. Oh well.

  2. Dick, try pasting the HTML into Word 2007, and then make the post using the new blog posting feature. I dare you!

    This weekend: Excel 2007 Power Programming With VBA, chapters 23, 25, and 26. Plus a pot of beef barley vegetable soup simmering on the stove.

  3. While we’re on the topic of Outlook… I’ve never used it. Well, I’ve used it for maybe an hour in order to write a demo for a book. But that’s it. It seems like overkill to me.

    Why do you use Outlook rather than Outlook Express?

    I like OE because it’s also a newsreader. I’ve gotten into the habit of checking the private newsgroups while my email is downloading. I’ve also set up some mail rules to highlight subject lines in color, and send others to various folders. In other words, it does everything that (I think) I need. What am I missing? What do you do with Outlook that I can’t do with Outlook Express?

  4. We use Outlook at work. It has a calendar in it. Good tool to arrange meeting with. Decisionmakers like that.

    The thing I like about Outlook is that its object model is exposed in VBA, I can use spreadsheets or databases to generate email and manipulate calendar entries. But I don’t like enough to have it installed at home.

  5. It was glorious weather in Perth, Australia

    So we went to the beach and had a BBQ and a swim.

    I use outlook at home as I use it at work and it standardises everything, transfer of email archive files, notes and address books etc


  6. Hi Dick,
    If you want smaller HTML code for a table only (no graphics) and it is just for looks you could use my subroutines.
    and for the other way around after pasting from an HTML table
    into Excel the TrimALL macro to remove extraneous and leading/trailing
    spaces and non-breaking space characters.

  7. Yup, if you’re unlucky enough to work for someone else, you’ll be using Outlook. You can organize meetings and the application will remind of your meetings.

  8. I can’t even remember the last time I had a meeting. I keep track of upcoming events by using the old fashioned method: yellow sticky notes on the monitor.

    I once did a mass mailing using Outlook Express and Excel. A simple macro using SendKeys worked perfectly. Doesn’t Outlook pop up a security warning message every time another program tries to send mail?

  9. That security warning is a pain. There’s probably a better way to send email without using Outlook at all, but if you need to distribute some code that sends email you can be sure the recipient has Outlook. It’s also pretty easy to automate and easier still if you use a wrapper like this.

    Sub Mailer(MailTo As String, Subject As String, Body As String, _
        Optional MailCC As String, Optional MailBCC As String, _
        Optional Attachments As Variant, Optional Receipt As Boolean)

    ‘Version: 1.0
    ‘Sends an email via Outlook
    ‘Attachments = either a string or an array of strings

    Dim olapp As Object ‘Outlook.Application
    Dim mailItem As Object ‘Outlook.mailItem
    Dim lngCount As Long

        Const OL_MAILITEM = 0
        ‘instantiate Outlook
       Set olapp = CreateObject(“Outlook.Application”)
        Set mailItem = olapp.CreateItem(OL_MAILITEM)
        ‘add the recipients
       mailItem.To = MailTo
        If MailCC GREATERTHANLESSTHAN “” Then mailItem.CC = MailCC
        If MailBCC GREATERTHANLESSTHAN “” Then mailItem.BCC = MailBCC
        ‘add the message
       mailItem.Subject = Subject
        mailItem.Body = Body
        ‘add receipt if required
       If Receipt Then mailItem.OriginatorDeliveryReportRequested = True
        ‘add attachments
       If Not IsMissing(Attachments) Then
            If IsArray(Attachments) Then ‘an array was passed
               For lngCount = LBound(Attachments) To UBound(Attachments)
                    mailItem.Attachments.Add Attachments(lngCount)
            Else ‘an item was passed
               mailItem.Attachments.Add Attachments
            End If
        End If
        ‘send it
        Set olapp = Nothing
    End Sub

    Be sure to replace GREATERTHANLESSTHAN with . I’ve rarely had the patience to use Sendkeys except where it is absolutely necessary to automate an old crummy DOS-in-a-Windows-box applications that you sometimes have to use. Even then, you have to babysit the screen while it works.

  10. John:

    Post-it Software Notes – Lite 3.0

    All the fun of stickie notes, none of the annoying finger prints on the monitor ;)

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.