• Can’t save Word VBA Template files

    Author
    Topic
    #351466

    I’ve been having this persistent problem with Word 97 VBA where I can’t save a Word VBA template file after I’ve modified the code.

    When I try to save the file, either in the VBA editor or in Word itself, I get an error message saying, “The disk is full. Free some space on this drive…” (Screen shot of error message attached). Of course, there’s plenty of space on my hard drive, and this only seems to happen with files with VBA code, not regular Word (.doc) files.

    This is driving me crazy, because each time it happens and I can’t save, I have to export all my modules and forms, close the file, and then re-import them again.

    BTW, I am also using PC Docs 3.7.2 here — I don’t know if that could be causing the problem?

    Has anyone ever encounter anything like this?

    Thanks.

    Viewing 1 reply thread
    Author
    Replies
    • #508569

      Hi Stephan,

      Yikes. It sounds like something in the template is draining your machine’s resources. Probably something buggy and probably associated with a form/control. Is this happening with several templates or just one? (i.e. just a buggy template, or something wrong with your Word app?)

      You mentioned forms – are there more than one? Try a process of elimination – export all the forms, then re-import one at a time, saving the template between each re-import, and see if there is a specific one that triggers this problem. If so, you may need to rebuild that form.

      Hope any of the above helps,
      Gary

    • #508575

      Does PC Docs open templates as read only? If I were you I’d try to develop locally (outside of PC Docs if possible) then copy up to the net. Just a thought…

      • #508577

        Thank you Gary and Kevin for responding.

        I think I stumbled upon the answer in this Microsoft’s KB article: http://support.microsoft.com/support/kb/ar…s/Q166/7/88.ASP. Apparently, the culprit is Word 97 — the error will occur and you can’t save the file if there’s a missing reference in the VBA editor, so you have to remove the “missing” reference.

        I think this one should count as another Word 97 “annoyance”.

        • #508584

          Just for future “reference”, what is the missing reference, and how do you remove a reference that is “missing”?

          Gary (migrated to Win-Ofc 2K at last!)

          • #508592

            Missing references won’t be the same on any two machines. They’re references set in the code project to object libraries, dlls, etc. To locate one, you go into the VB editor and select References from the Tools menu. That will show you a list of available libraries, with those that are actually set sorted to the top and showing a check next to the name. If any of them say MISSING, you need to uncheck that reference. Then compile your code to see if you really need that reference. If you do need it, you’ll have to browse to find the correct file. This can easily happen if you develop on a machine with one version of a library (i.e., Word 97) and then copy the project to a machine with a different version (Word 2000). I found this very annoying a couple of years ago when both Outlook 97 and Outlook 98 were being marketed at the same time. Any given machine might have the wrong version.

            • #508594

              Thanks Charlotte for the great info.

              I’m lucky I guess to have led a relatively sheltered life in my development efforts, so hadn’t run into this particular one before!

            • #508595

              You’re welcome. For what it’s worth, the same information applies to all the Office apps and to VB as well.

      • #508623

        Although it doesn’t appear to be the culprit, and just for future reference, you can disable docsopen (in an non Win2K environment) by disassociating the Wordin__ template (probably Wordin80) in your templates and add-ins.

        I’ve been working with Docs for over 5 years, and it’s never effected my templates, and going outside docs is generally simple, even without disassociating the template.

        I can update this Tuesday with info on disassociating in Win2k — it’s in my notes at work — but I believe it’s a matter of temporarily moving or renaming the .ini file.

    Viewing 1 reply thread
    Reply To: Can’t save Word VBA Template files

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: