Consulting

Results 1 to 3 of 3

Thread: VBA from Excel to Outlook 2010 help

  1. #1

    VBA from Excel to Outlook 2010 help

    Hello,

    Im new, so please, bare with me if I do this incorrect (which I am sure I will).

    So, I have an old VBA Excel macro that someone created for me years ago, back when actually using Office XP. The code has endured over the years, for the most part. Only part I have had to change has been cosmetic stuff like a progress bar.

    So, its basically an Excel macro that looks for a criteria in one spreadsheet, finds an email address in another spreadsheet, creates a workbook, references another spreadsheet to find an email address based on another set of criteria, opens an email in Outlook, attaches that workbook, and sends it out.

    Watching it run, it is creating the spreadsheet, finding the email address, but when it goes to call Outlook to create the email, thats where its stopping. Specifically, at this line.

    blnSuccessful = objOutlook.FnSendMailSafe("(I omitted the email address here)", _
    "", _
    "", _
    Vendor & " - " & Left(emailSubject, Len(emailSubject) - 2), _
    "Hello " & vendorData(vendorPlace).Contact & emailBody & signature, _
    UserForm1.CheckBox14.Value, _
    CDate(UserForm1.TextBox38.Text), _
    vendorFile)

    Anyone have any clue as to what needs to be changed here?

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Welcome to the forum!

    If you are using that for MSOutlook 2010, it will not work. See the note at http://www.everythingaccess.com/tuto...curity-Warning.

    CDO is probably the better way to go if you want to bypass security popups. http://www.rondebruin.nl/cdo.htm

  3. #3
    Thanks. I was able to get the CDO working with Outlook and Excel. Now, the fun part (since I didnt code this and my knowledge is limited at best), trying to figure out how to strip out the blnsuccessful out of the original code and insert this and have it all work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •