• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • 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.
0
Ekaterin
Asked:
Ekaterin
  • 4
  • 3
2 Solutions
 
BembiCEOCommented:
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
0
 
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.
0
 
BembiCEOCommented:
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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
0
 
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.
0
 
bruintjeCommented:
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
bruintje
0
 
BembiCEOCommented:
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?
0
 
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.

Ekaterin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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