Consulting

Results 1 to 4 of 4

Thread: VBAproject.OTM keeps expanding by itself!

  1. #1

    VBAproject.OTM keeps expanding by itself!

    Dear all,

    This is my first post, I would be grateful for any help.

    I have written a filing macro at work (it takes emails, identifies the sender and files them appropriately in our work directory). It all works fine and I am happy with it. I am due to roll it out to my company next week (so this is very time critical)

    However,

    Yesterday, Outlook started repeatedly crashing while I was editing the code. I then noted that the VBAProject.OTM file had grown from 120k to 45MB. It grows everytime I save my project, even if I have not changed it.

    I can reduce the size by copying out all the code into word, exporting the userforms and then reimporting all code and forms into a new project. However, the problem just starts again.

    the beginning of this problem coincides fairly closely with my writing an 'install program' which replaces the users VBAproject file with my VBAproject file (and creates a backup of the original). I cant really see how this is related though.

    Has anyone seen anything like this before? I really need to identify the problem quick!

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Yikes, that's ugly. Don't use word though, word has all sorts of special chars used for formatting that can be invisibly embedded in an IDE. Use notepad.
    If it were me I would use the export feature to export everything to text. Open up those files in notepad and make sure they were clean. Then remove all the code. Go to debug>compile, then save an close outlook. Open outlook up and make import the files.

    If the problem persists at this point, I would close outlook, go to the control panel and open up programs and features. Then instead of uninstalling Outlook, run repair.
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Thanks Aaron,

    Unfortunately, at my work I can not access most of Control Panel. But thanks for the point re Word. I havve taken to just expoerting all the modules and forms and then reimporting them into a new project - which works fine and also reduces the file size.

    I have a theory that this problem is related to the project file storing information regarding previous actions - ie it is storing all my undos! I have noticed that sometimes when I open the VB editor I am presented with undo option from last time I used Outlook - this info must be getting stored somewhere so mayne in the project file?

    The only other thing I can think of is that, as part of my programme, I have Outlook run an Advance Search to find a particular Note in the Notes Section where I store user data. This works very well, but I wondered if these searches were building up some bank of data somewhere? I only mention it because I have never used Advanced Search before so dont really know if thhere are any possible issues like this.

    More recently, the bloating effect seems to have reduced. Yesterday it grew from 120k to 580k over the course of the day (without anything significant being added to the code)! Still annoying but manageable!

    Chris

  4. #4
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Where are you going to view the project size?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

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