Results 1 to 3 of 3

Thread: VbaProject.OTM won't run after save

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2009
    Posts
    26

    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!

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: VbaProject.OTM won't run after save

    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
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2009
    Posts
    26

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width