+ Reply to Thread
Results 1 to 2 of 2

VBA Macro to open workbook as email attachment works fine, but only once!

  1. #1
    Registered User
    Join Date
    02-11-2021
    Location
    Shropshire, England
    MS-Off Ver
    O365
    Posts
    2

    Question VBA Macro to open workbook as email attachment works fine, but only once!

    Hi, this is my first post and I'm a macro-n00b so please go easy :)

    My aim was to make a macro that took the workbook I was in, attached it to a fresh Outlook Express email, and then filled in the To, BCC, Subject and Body. (This would enable staff to just complete the banking, press the button and fire off the workbook to finance with a uniform description in the body of the email.)

    This macro works perfectly. Once. And then I get System Error &H80070020 (-2147024864) thereafter - unless I make the file Read Only, and then it continues to work fine. But I don't want the file to be Read Only because that means not-IT-savvy staff will need to mess about with it, so the help I need is making it so this works every time instead of just once, please. (Obviously, I've anonymised and simplified the email contents.)

    Please Login or Register  to view this content.
    All help gratefully received! :)

  2. #2
    Registered User
    Join Date
    02-11-2021
    Location
    Shropshire, England
    MS-Off Ver
    O365
    Posts
    2

    Question Re: VBA Macro to open workbook as email attachment works fine, but only once!

    OK, I've progressed to this now, and it works perfectly and repeatedly if I use .Send but the moment I start using .Display it still only sends once per workbook and refuses thereafter. Any ideas?

    Please Login or Register  to view this content.
    Last edited by MDL2021; 02-11-2021 at 07:50 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Outlook an email with .xls attachment, download and open Workbook
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2020, 08:32 PM
  2. [SOLVED] Macro which tracks when an email attachment has been open
    By vba1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2018, 10:38 AM
  3. Open excel attachment from email in Outlook and copy and paste into workbook
    By RubiksCuber in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2016, 10:26 PM
  4. [SOLVED] Help with modifying VBA Macro - Works fine but needs fine tuning !
    By stefan27 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2015, 10:27 AM
  5. Workbook won't display after macro is complete (works just fine in Excel 2010, 2007)
    By gilwoodring in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2014, 06:36 PM
  6. Create macro to open daily email and Excel attachment from Outlook
    By wardpa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2013, 10:26 AM
  7. Email Open Workbook as an Attachment to Email
    By BazzaBoy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2009, 06:19 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1