VB Send Email - Error

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Dominic_Fichera
Pro Scripter
Posts: 82
Joined: Mon Mar 24, 2014 12:15 pm

VB Send Email - Error

Post by Dominic_Fichera » Tue Aug 04, 2015 2:00 am

Hey all,

I've tried including the sample script used to send emails with VB into my script, but have come across an error.

In the past, it has always worked, which is great, but for the first time, I'm having problems with it.

Image

So far, I have managed to work out the issue is caused by the script running as admin (99% of the script needs to run as admin, which is why it's currently set to admin), but Outlook running at normal level. If I run Outlook as admin, this resolves the issue, but I was hoping for something that would take into consideration when Outlook isn't run as Admin.

I've found an article on Microsoft.com http://answers.microsoft.com/en-us/offi ... a9a9f4a424 which says that instead of just "creating a new object", I could get the script to check if it exists and just run with the already-open Outlook. Do you think this is something that would make a difference in this case?

Thanks for your advice! :)

Dominic

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: VB Send Email - Error

Post by Marcus Tettmar » Mon Aug 10, 2015 2:52 pm

I don't know why you need to run Outlook as Admin but this does suggest a permissions problem.

I'm not sure if I can offer much help with Outlook/Office installations.

Is there any reason why you need to use Outlook to send emails instead of the built in SMTPSendMail function?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Dominic_Fichera
Pro Scripter
Posts: 82
Joined: Mon Mar 24, 2014 12:15 pm

Re: VB Send Email - Error

Post by Dominic_Fichera » Mon Aug 10, 2015 9:26 pm

Hey Marcus,

Thanks for your response :)

The reason I've been using outlook to send emails is because my school provides me an exchange email address, and from my understanding, the SMTP commands won't work with exchange. All good though, I'll have a play around and work something out.

Thank,

Dominic

User avatar
Grovkillen
Automation Wizard
Posts: 1132
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: VB Send Email - Error

Post by Grovkillen » Tue Aug 11, 2015 10:21 am

Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts