VBA code (rules) won't work after reboot

Status
Not open for further replies.
J

John66

First off I am not very knowlegeable about Outook or VBA coding so I

apologize in advance for missing the obvious.

I have created some rules in outlook (actually exported/imported from a

functioning account). The rules basically:

-look for an email with an attachment and with a specific word in the

subject line

-move the email to a different folder

-copy the attachment and place it in a shared system folder (done with VBA

code)

The problem I have is the rules will only work until Outlook is closed down

or the server is rebooted. After that the rules partially work (the VBA code

doesn't). The VBA code is still visible in the editor and the rules still

point to the applicable VBA script. However, the code just doesn't run.

To get around the problem, I delete the .otm file and rebuild (via import of

the .bas files) the VBA project, save it, and close the VBA editor. Until I

close down Outlook again the rules all function properly.

Could anyone describe to me where i am going wrong.

Thanks,

John
 
S

Sue Mosher [MVP]

Does other VBA code run? If not, check your macro security settings. You

might also put a Debug.Print statement in the Application_Startup event

handler to "wake up" the VBA environment.

Sue Mosher

"John66" <John66> wrote in message

news:4D4B6B42-9683-4F2F-A810-BB9BBD2F0512@microsoft.com...
> First off I am not very knowlegeable about Outook or VBA coding so I
> apologize in advance for missing the obvious.

> I have created some rules in outlook (actually exported/imported from a
> functioning account). The rules basically:
> -look for an email with an attachment and with a specific word in the
> subject line
> -move the email to a different folder
> -copy the attachment and place it in a shared system folder (done with VBA
> code)

> The problem I have is the rules will only work until Outlook is closed
> down
> or the server is rebooted. After that the rules partially work (the VBA
> code
> doesn't). The VBA code is still visible in the editor and the rules still
> point to the applicable VBA script. However, the code just doesn't run.

> To get around the problem, I delete the .otm file and rebuild (via import
> of
> the .bas files) the VBA project, save it, and close the VBA editor. Until
> I
> close down Outlook again the rules all function properly.

> Could anyone describe to me where i am going wrong.

> Thanks,
> John
 
J

John66

Thank you so very much for your help!

The security settings were the problem.

"Sue Mosher [MVP]" wrote:
> Does other VBA code run? If not, check your macro security settings. You
> might also put a Debug.Print statement in the Application_Startup event
> handler to "wake up" the VBA environment.
> > Sue Mosher
> > >

> "John66" <John66> wrote in message
> news:4D4B6B42-9683-4F2F-A810-BB9BBD2F0512@microsoft.com...
> > First off I am not very knowlegeable about Outook or VBA coding so I
> > apologize in advance for missing the obvious.
> > I have created some rules in outlook (actually exported/imported from a
> > functioning account). The rules basically:
> > -look for an email with an attachment and with a specific word in the
> > subject line
> > -move the email to a different folder
> > -copy the attachment and place it in a shared system folder (done with VBA
> > code)
> > The problem I have is the rules will only work until Outlook is closed
> > down
> > or the server is rebooted. After that the rules partially work (the VBA
> > code
> > doesn't). The VBA code is still visible in the editor and the rules still
> > point to the applicable VBA script. However, the code just doesn't run.
> > To get around the problem, I delete the .otm file and rebuild (via import
> > of
> > the .bas files) the VBA project, save it, and close the VBA editor. Until
> > I
> > close down Outlook again the rules all function properly.
> > Could anyone describe to me where i am going wrong.
> > Thanks,
> > John


> .
>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
T VBA to Sort Rules [A-Z] - code provided Outlook VBA and Custom Forms 9
F VBA code to dock Styles whenever I write or edit an email Outlook VBA and Custom Forms 0
S Skype for business meeting vba code Outlook VBA and Custom Forms 1
R Expand VBA Permanent Delete Code Outlook VBA and Custom Forms 6
B Outlook Business Contact Manager with SQL to Excel, User Defined Fields in BCM don't sync in SQL. Can I use VBA code to copy 1 field to another? BCM (Business Contact Manager) 0
A VBA Code in Outlook disappears after first use Outlook VBA and Custom Forms 1
F VBA to ensure a code is entered in Subject title Outlook VBA and Custom Forms 1
N Open & Save VBAProject.Otm using VBA Code Outlook VBA and Custom Forms 1
R VBA Code to permanently delete selected email Outlook VBA and Custom Forms 10
C Need VBA code to automatically save message outside outlook and add date Outlook VBA and Custom Forms 1
S VBA Code to move mail items from search folder to inbox subfolder Outlook VBA and Custom Forms 4
B VBA Code to create appointment from email Outlook VBA and Custom Forms 1
D VBA Code to strip Subject Line when replying or forwarding Using Outlook 3
M VBA Code to Restart Outlook on error Outlook VBA and Custom Forms 3
Z Default VBA code for extracting data from email (Outlook) to Excel? Outlook VBA and Custom Forms 1
M VBA Auto-Reply code for Two Mailboxes on one Outlook Session. Outlook VBA and Custom Forms 4
Z Protecting VBA code - anything new? Outlook VBA and Custom Forms 2
G VBA code to enable a rule based on time of day for a IMAP mail account Outlook VBA and Custom Forms 14
S VBA code to rename a task (flagged message) Outlook VBA and Custom Forms 1
M VBA code to save email attachments (PDF) as email subject line Outlook VBA and Custom Forms 1
F VBA Code to change subject Like Outlook VBA and Custom Forms 3
Diane Poremsky Pasting VBA code (and other editing) Outlook VBA and Custom Forms 4
C Required VBA code to complete task when replied to Outlook VBA and Custom Forms 2
Kelli VBA code for Outlook Using Outlook 1
S Requried a VBA Code to export Calander details to excel... Outlook VBA and Custom Forms 4
M VBA Code to extract data from an Outlook Form Using Outlook 0
M VBA code needed to move from Outlook 2010 subfolder to Symantec Vault subfolde Using Outlook 0
C In need of VBA code to read / parse HTML - Outlook emails Using Outlook 0
R [VBA] complicated(?) outlook events - need help with code Using Outlook 15
R how to get Outlook VBA code to work on the current folder Using Outlook 3
J VBA code can't be completely executed in outlook 2013 Using Outlook 0
D VBA: Send-From Code for Template Shortcut? Using Outlook 0
P VBA Code being completely ignored by Outlook Using Outlook 7
M Updating VBA code from outlook 2007 to outlook 2010 Using Outlook 1
J VBA code to determine 'show' state of SearchBar Using Outlook 7
D VBA code running on Server? Shared mailbox email routing Using Outlook 3
L Send E-mail with VBA code from [E-mail Distribution Group] if I have “Send as” Using Outlook 6
S Outllok 2007 VBA code to send mail automatically from drafts folder Using Outlook 1
S ThisOutlookSession in VBA not there anymore and code is gone Using Outlook 2
F No Attachment Warning - VBA Code HELP Outlook VBA and Custom Forms 1
N VBA code to show today's date + a sequencial number in subject lin Outlook VBA and Custom Forms 1
A Accessing .pst folder in outlook using VBA Code Outlook VBA and Custom Forms 4
C Beginner Needs VBA Help in Modifying Code Outlook VBA and Custom Forms 2
P 'Trusted' VBA code in Outlook 2003? Outlook VBA and Custom Forms 2
F Recovery of VBA code Outlook VBA and Custom Forms 2
B convert VBA code to Add-in Outlook VBA and Custom Forms 1
B how/what dialog boxes can I display from VBA code Outlook VBA and Custom Forms 1
L Macro/VBA to Reply All, with the original attachments Outlook VBA and Custom Forms 2
L VBA unknown character Outlook VBA and Custom Forms 2
G Move tasks up/down todo list by VBA Outlook VBA and Custom Forms 1
Similar threads


















































Top