Excel VBA: Refuse to open template if one is saved as a draft

kbdavis11

New Member
Joined
Dec 8, 2014
Messages
30
Hello all -

I am trying to search for a solution to my issue but have not had any success thus far. Firstly, I should admit I have only used VBA in Excel - and I have never used in Outlook. Now with that being said, let's get to some general information...

I have a template email saved for Outlook - let's call it 'reports'. I send this email once per week, yet I update it throughout the week and keep it saved in my drafts folder. Sometimes I start the email on Monday, sometimes later. The reason I bring this up is that I do not always recall if a draft has already been created. I would prefer not to have more than 1 draft going simultaneously.

Now to the question :confused::
Is it possible to work inside VBA that once I attempt to open the template 'reports', Excel will first check to see if I have one in my drafts folder, and if so, respond with a MsgBox along the lines of: "You already have an instance of 'Reports' in your drafts folder. <Break> Would you like to open the saved email?"... then have a vbYesNoCancel box that comes up?

  • Yes = Go to the already created email in my drafts folder.
  • No = Continue with the new email.
  • Cancel = Just as it sounds, cancel it altogether.

Now, I don't mind this popping up for any other template that I use, I would actually prefer that it always does this check with any template I open.

Now some additional information - this check could be based solely on subject line in the template email because I have those saved in the template. Could possibly be the easiest to implement.
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top