[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Running a custom script

I want to create a custom script to run using the rules wizard to do the following

Save the attachment on the file to a specific directory (Check if it has the attachment first, of course)
Run a small application, passing in the name of the attachment as a parameter

I've tried to use the MSDN help page, and it can see the script. It's just not running. Any ideas why would be gratefully received.
  • 4
  • 3
2 Solutions
You mean, the script is ready, but not running?

Have you checked the macro security of Outlook? The default settings allowing only secure or signed macros to run
EkaterinAuthor Commented:
Yes, I've set the macro security to 'low', but even with this the script is not running. I've even just put in the standard script from MSDN, but no msgbox appears. I can get it to do almost any of the other options (play a sound, flag it, move it etc.) just not run the script.

If anyone can manage what I want it to do (recap)

1) save the attachment to a specific directory
2) run an exe with the name of the attachment passed in as a parameter

then you get the points. I don't actually need it to be done via script.
How have you triggered the script, by a rule?

Can you send a link to the script or post it here, if not too long?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

EkaterinAuthor Commented:
Screendump of rule can be found at www.reeve.me.uk/images/screendump.png

Macro is

Sub CustomMailMessageRule(Item As Outlook.MailItem)
   MsgBox "Mail message arrived: " & Item.Subject
End Sub
EkaterinAuthor Commented:
Update - I've just put in a really simple macro

public sub msg()
msgbox "Hi there"
end sub

I tried to run it from tool > Macro > Macros and got the following error.

The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros.

It could be that we are running Small Business Server here, and it may have disabled macros on there (if so, we have a real problem as my husband changed the admin password, and mistyped it - twice - the same way)

Any ideas as to what is happening will be gratefully received.
Hello Ekaterin,

i assume the sequence was
1. you opened outlook
2. then went out to look for a script
3. found a script
4. realized the security was set to high
5. put it lower but it still does not work
6. you need to close outlook and reopen it for the new security settings to take hold
7. then try your script again

hope this helps a bit
You server produced a timeout at the moment.

Jepp, make, what bruintje said, restart Outlook, have a look again at the security settings if they are still set to low. If Outlook changed the settings back, there may be a AD-policy, which sets the Outlook security back to high.

I'm not sure if SBS has a default policy for Outlook.

You want to say, you have lost your Admin password for the SBS Server? No other Domain Admin?
EkaterinAuthor Commented:
Yes, we have lost (or rather my husband lost) our admin password for our SBS server, with no other domain admin.  Wonderful.
To make it worse, we had mirrored discs, and we couldn't get a linix system to run on mirrored discs. We have now used ghost to create a single disk, and need to try the linix disc on that.  But that is for another day and, indeed, another question on EE.

Much thanks to both Bembi and bruintje. As you were both really helpful, I'm sharing the points between you.


Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now