VbaProject.OTM won't run after save
I have been coding in VBA for about 6 years now and attempted off and on writing macros for Outlook. Reasons like this have discouraged me in the past. I created a simple folder selector and inserted in in the VBA editor. I tested all day and then went to close Outlook (2007 latest FP) and it asked "do you want to save" and I of course I said yes. Now op ALT+F11 and I see the code, but the code would never run again after I saved it.
The directory tree is:
Code:
Project1(VbaProject.OTM)
Microsoft Office Outlook Objects
ThisOutlookSession
The routine that worked before is still there and begins:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
xxxxx
End Sub
I also tried enabling trace to see if a line of code was failing by highlight the first line of the subroutine. Thought would catch the processing via trace but it never executes the code that is now saved there.
What am I missing?
I even tried setting all macros to run with warnings and that did nothing. It's just like the VB macro in the editor no longer exists. I even tried creating a self certificate SELFCERT.EXE and entering my name but I never see where a certification is even requested.
I finally broke down and bought Sue's book and was going to wade through all the security stuff while installing redemtion as well but I can't even get to first base. I did have a deja vu remembering a case before where Outlook chooses to run macros sometimes and not others. thanks!
Re: VbaProject.OTM won't run after save
Quote:
I even tried setting all macros to run with warnings and that did nothing.
2 suggestions
FIRST
1) Close Outlook
2) After it is closed, press CTL ALT DEL to bring up Task Manager. Check if Outlook has actually closed. If it has then restart outlook and try again. If not then end the application and restart outlook. Now try again.
If the above doesn't help then try this
SECOND
1) Close Outlook
2) Open Windows Explorer and navigate to this path
C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Outlook
3) Rename the file VbaProject.OTM to VbaProject.Old
4) Now open Outlook and check.
Sid
Re: VbaProject.OTM won't run after save
THank you. After setting all macros on with warnings, I rebooted the system and the VBA code has started running again, allowing me to select a folder each time I send. Thank you.