VBA code (rules) won't work after reboot

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
0
Utf
1/19/2010 7:22:01 PM
outlook.program_vba 490 articles. 0 followers. Follow

2 Replies
1385 Views

Similar Articles

[PageSpeed] 0

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, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


"John66" <John66@discussions.microsoft.com> 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 


0
Sue
1/19/2010 8:14:59 PM
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, Outlook MVP
>    Author of Microsoft Outlook 2007 Programming:
>      Jumpstart for Power Users and Administrators
>     http://www.outlookcode.com/article.aspx?id=54
> 
> 
> "John66" <John66@discussions.microsoft.com> 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 
> 
> 
> .
> 
0
Utf
1/19/2010 9:31:01 PM
Reply:

Similar Artilces:

Outlook 2003 working with Groupwise client
We are moving our people from Groupwise to Exchange and I am having a horrible time getting the two to work together. We need to keep both clients on the machine for a short time while the switch is done. I installed Outlook 2003 on my workstation running Windows XP and Outlook and Groupwise are happily coexisting. When I tried this on a Windows 2000 machine everything went to crap. I've tried all of the tricks I can think of. I've removed Groupwise and windows messaging and reintalled everything from scratch and no dice. I just keep getting Outlook MAPI errors and messages s...

failure of Open XML 1.1.4 to work
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Previous versions of this worked fine. This version comes up with comment &quot;not enough memory&quot;. As I have 2mg Ram this seems strange. Any help appreciated. I'm afraid you haven't provided sufficient information for anyone to go on, especially since that message quite often has nothing to do with memory. For any questions of a technical or performance nature it's important that you specify your current update level of OS X as well as for Office. Exactly when does this messag...

Rules not working #7
I have a mail profile that I use with one email address that gets a LOT of spam. I have a fair size number of rules (probably 10-15) for categorizing and filtering it, all of them starting wth "Apply this rule after the message arrives". Problem is that most of them only work about half the time. I'll get some messages that were moved to the correct folders, and some similar messages still in the inbox. If I click "Rules Wizard" and the "Run Now" button, selecting all the rules, it moves the ones still in the inbox to the correct folder. How come it didn&#...

Hyperlinks do not work in email in outlook
Shortly after installing the new service pack for Windows XP I began getting this message whenever I tried to click on a hyperlink in an email: "This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator." I assume it is because some switch has been set. Could someone tell me how to regain the ability to use the embedded links in email in outlook? Thanks Bob <anonymous@discussions.microsoft.com> wrote: > Shortly after installing the new service pack for Windows > XP I began getting this message whene...

hyperlinks within the same document are not working
Hi. I am trying to create an email publication in MS publisher 2007. It has several stories that will be sent out in email and the first section is supposed to contain a summary with hyperlinks to each story within the same email for more details. I am adding a bookmark at the begining of each story, and then trying to create a hyperlink in the summary section to the bookmark. However, when I send the publication as email, or do an email preview, the hyperlinks do not work. Please help! ...

Exchange 2003 Envelope Journaling not working
Hi, I have a single Exchange 2003 SP1 server. I'm trying to get envelope journaling to work. I have enabled message journaling and then used "exejcfg.exe -e" to enable envelope journaling. The journal mailbox is receiving the standard message journal messages, but not the envelope journal formatted messages. I have verified with LDP to confirm the heuristic value is 512 for the Exchange Org object. Anyone else seen this before or have any advice? Thanks --- Greg Reboot maybe? greg@intellireach.com wrote: > Hi, > > I have a single Exchange 2003 SP1 server. I...

Amazing Problem in AllocPhysMem wince 6.0
Hi I am writing a Port Driver for x86 platform in WinCE 6.0. I want to allocate virtual and equivalent physical memory in driver and mapped it to USER mode to use application. For that I used AllocPhysMem in driver and passed that address through IOCTL calls but i cant use that virtual and physical address in application side. Because AllocPhysMem returns Error Code as 0x57 (meaning Parameter incorrect). But the same code is working in WinCe 5.0. My code snippet is, VirAddress = (LPVOID)AllocPhysMem(32, PAGE_READWRITE|PAGE_NOCACHE, 0, ...

DB Mail is is not working. Need help please.
I have try stop and start the db mail by executing the SPs below but no luck. Does anyone has seem the error below and how to fix it. Thanks in advance for your advise/help. --steps USE msdb; go EXECute sysmail_stop_sp; go EXECute sysmail_start_sp; go EXECute sysmail_help_queue_sp @queue_type = 'Mail'; go queue_type length state last_empty_rowset_time last_activated_time ---------- ----------- ---------------------------------------------------------------- ----------------------- ------------...

How do I get automatic completion to work for an in-cell dropdown
If I have a list of Alpha, Beta, Gamma and an in-cell dropdown, I'd like typing 'G' to auto-select Gamma. I'm pretty sure it was doing that at some point, but now, it does not. This isn't supported under data|validation. You could use A,B,G in the dropdown and then use a helper cell with a formula in it, though. Say you put your abbreviations in A1:A3 of sheet2 and the real names in B1:B3, then you could use: =if(a1="","",vlookup(a1,sheet2!a:b,2,false)) Joseph Weisblatt wrote: > > If I have a list of Alpha, Beta, Gamma and an in-cell dropd...

Workflow rule crashes target entity
When creating a new workflow rule for a new invoice entity, it seems to go into a loop in CRM Dynamics. At first, I wanted to make a rule for copying a description from the original opportunity to an invoice, but this caused the invoice window to load forever. When testing an easy rule which just has to enter the value "test" to a description field when creating a new invoice, the same thing happens. I wonder if this has anything to do with the administrator rights? I read something about 9/10 of all workflow rule problems are related to this. Can you post your rule for revi...

Help revising slow code
I am using the following code to remove all the lines in a worksheet that have a zero value in Column H. Because there are thousands of rows in the worksheet, this loop takes forever! Does anyone have any suggestions for doing this more quickly? Thanks! Sub Delete_Row_w0() Dim Firstrow As Long Dim LastRow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With With Sheets(1) .Select ...

_CRTDBG_MAP_ALLOC doesn't seem to work
I'm having problems tracking down a meory leak and thought the best way would be to follow the instructions in MDSN: "Detecting and Isolating Memory Leaks Using Microsoft Visual C++" However, I can only get the basic memory dump, without source file and line number. It's as if _CRTDBG_MAP_ALLOC is being ignored. I tried building a test application (basic MFC SDI application) to try it out. At the top of Leaktest.h, I have #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> In CLeakTestApp::InitInstance(), I have _CrtSetDbgFlag( _CRTD...

Outlook
Is there a way of stopping OL from destroying HTML code when forwarding HTML formatted emails ... it seems to be very, very aggressive and eats any formatted mail that I attempt to send, it inserts <p> tags every where - I've even seen it change the height and width attributes of <img> tags etc. etc. This hasn't anything to do with my local settings - I've tried every possible combination and permutation of every check box and select box there is to be found - all to no avail - we've been able to consistently reproduce this issue on both sides of the world on many, ...

Possible to create a rule to alert on BCC messages?
Using Outlook 2007/Exchange Server 2007 Hello: I sometimes miss that I'm receiving an email as a blind copy. I was hoping to create a rule to alert me when I'm in the BCC field. However, when using the rules wizard, I only see the options regarding my name in the To or CC field. Is there a way to create this that I may be missing? Thank you. In article <#pJLIK1ALHA.4704@TK2MSFTNGP06.phx.gbl>, victoria@dig.com says... > > Using Outlook 2007/Exchange Server 2007 > > Hello: > > I sometimes miss that I'm receiving an email as ...

OWA timeout does not work for every client
I set the timeout setting on OWA, i don't have any issues but i'm getting lots of complaints that users are getting logged of after 15 min. why does this happen with some clients but not all? thx ...

Best C# Book for VBA Programmers
I have been developing in Excel/VBA/SQL for 10+ years and have a little VB.NET. I have a pretty good - but certainly not great - understanding of OOD & OOP. I want to get into C# as more and more Jobs that I'm interested in are looking for +/or expecting it but I have zero knowledge of C of any flavour. Given my background I would value all your thoughts on which is the best book(s) to buy. Or are there some ace WebSites / Parts of MSDN that I could use to achieve the same end? Thanks in advance Chris I would reccomend learning a non-microsoft language. Microsoft has proven time...

Journal stopped working #2
I have noticed that after upgrading from Outlook XP (2002) to Office Outlook 2003 my journal has completely stopped logging entries. I have turned it off and re-initialized it and still not entries. I mailing want it to log Word and Excel files. Any help would be appreciated I am running Exchange 2003 in cached outlook mode on a SBS 2003 server. ...

Setting up Exchange 2003
I had this problem the other day while extending the schema in preparation for an upgrade to Exchange 2003. I searched through a lot of databases and search engines, and found that a lot of people have had this problem, but none of the forums led to a clear cut answer to the issue. So, I thought I'd share my solution to try and help others out, and save them some time and frustration. I was ready to call Microsoft support right before I figured this out. While running forest prep (setup /forestprep), setup failed with Error code 0XC103798A. It then specified to check the Exchange inst...

Multi-Select Listbox VBA code causing overflow in loop
Private Sub Form_Current() Dim oItem1 As Variant Dim oItem2 As Variant Dim bFound1 As Boolean Dim bFound2 As Boolean Dim sTemp1 As String Dim sTemp2 As String Dim sValue1 As String Dim sValue2 As String Dim sChar1 As String Dim sChar2 As String Dim iCount1 As Integer Dim iCount2 As Integer Dim iListItemsCount1 As Integer Dim iListItemsCount2 As Integer sTemp1 = Nz(Me!SignsList.Value, " ") sTemp2 = Nz(Me!SymptomsList.Value, " ") iListItemsCount1 = 0 iListItemsCount2 = 0 bFound1 = False bFound2 ...

I cannot paste from one workbook to another. Copy works, paste do.
When I attempt to copy from one workbook and paste into another, copy appears to work but paste does not. The paste menu item is grayed out in the workbook to which I attempt to paste. Are there setting that can be changed to aloow the paste?? Check to see if either workbook and/or worksheet is protected. If so, unprotect. Then Copy/Paste should work. BTW, how are you copy?paste(ing) Tab or content? Dennis "JimmyMc" wrote: > When I attempt to copy from one workbook and paste into another, copy appears > to work but paste does not. The paste menu item is grayed out...

Generating Code...
Recently I have encountered what appears to be an endless hangup, tying up 100% of the cpu. Could someone explain what is going on here? ThePlanner3.cpp Generating Code... cl.exe terminated at user request. Tool execution canceled by user. I might add that this is still occurring after resetting my Release Project Settings. The Debug configuration is fine. ----------- "SteveR" <srussell@removethisinnernet.net> wrote in message news:udziG18cHHA.2316@TK2MSFTNGP04.phx.gbl... > Recently I have encountered what appears to be an endless hangup, tying up > 100% of th...

Working with elapsed time data
How do I set up Excel to accept race times for a cross- country team? I want to enter minutes and seconds for each runner for each race. Then I want to calculate each runner's average time. When I enter minutes and seconds, Excel converts it to the time of day - which is not what I want. Go to www.cpearson.com for lots of tips on working with time. Bernard "DW" <dweskalnies@vertisinc.com> wrote in message news:080f01c38854$46e18100$a401280a@phx.gbl... > How do I set up Excel to accept race times for a cross- > country team? I want to enter minutes and seconds for...

Spreadsheet macro stopped working!
Hi, I recently made an Excel spreadsheet for keeping track of my golf score. The spreadsheet is quite simple. It consists of 4 sheets: Scorecard, statistics, database and equations (for calculating some specific). I insert informations about the golf course I'm playing and how my score was etc. I then hit a button "Save scorecard" that runs a macro. The macro inserts specifik values from the scorecard into the database sheet (which works like a charm). The macro also updates the "Statistics" sheet with information about stroke number and points for ...

Work Schedule in Excel doc ... Don't have Excel
I just started a new job and the boss sent next weeks schedule in Exce format but I don't have excel. Is there anyway to just read an Exce file? If not can someone tell me my schedule for me -- charlene202 ----------------------------------------------------------------------- charlene2021's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1641 View this thread: http://www.excelforum.com/showthread.php?threadid=27780 Hi you can get a free viewer for excel from the microsoft site .. the following link should get you there http://office.microsoft.com/en-us/of...

error code 0x800703EE
I received error code 0x800703EE when trying to install SP2 for vista-32bit OS. any help with this error code would be appreciated. Hello Jimmy, 0x800703EE ERROR_FILE_INVALID System could not allocate the required space in a registry log; The volume for a file has been externally altered so that the opened file is no longer valid. How to obtain the latest version of the Windows Update Agent [v7.4.7600.226] to help manage updates on a computer: http://support.microsoft.com/kb/949104/ I'm suяe someone else will help you if this suggestion doesn't help. ...