• Closing template causes Word(Not responding) (W2000 SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Closing template causes Word(Not responding) (W2000 SR-1)

    Author
    Topic
    #362567

    Hi again,

    I’m having a problem with certain templates:

    Create a document based on a template which contain a UserForm with an OK button.
    After editing/adding text and then use File/Save and or using File/Close, responding yes to save changes, the document disappears but will not finish the saving such that Word remains hanging(Not responding).

    Does anyone have a suggestion of what can be wrong in my template code.

    Thanks

    Regards
    Bj

    Viewing 0 reply threads
    Author
    Replies
    • #550968

      You’re iguana have to post the code in the template.

      Also, what OS? Win9x, ,Mac or NT/2000 (wouldn’t you love to see Linux in that list???)

      You may have to include a list of the items in your Task List, but hold off on that till we see the code.

      • #551098

        Hi and thanks for the response.
        I attach a word document containing a list of the code. The template itself is >200 kb so it is not allowed attached.

        You will experience an amateur way of amending the original code from an expert. But anyway, it used to work perfectly.

        Hope for the best!

        Thanks again for the interest in helping me.

        Regards
        Bj

        • #551210

          Well, looking over your code is somewhat interesting, but it would be much easier for me if you could post an actual template, not just a document printout of the code.

          Any chance of that if you zip the template?

          • #551463

            Sorry Kevin, I should have thought about that earlier.
            By the way I’m on Windows NT, Word 2000 SR-1.

            (Have been away this week end and no chance of looking into the problem. Now it is monday morning and full time work with Quality Assurance/Quality Audits and implementation of SharePoint Portal Server)

            I zipped it down to 68 kb and here it is.

            Best regards
            Bj

            • #551478

              Hello Bj

            • #551486

              Thanks a lot hedgehog!

              It might be this bug, for me the freezing does not occur every time, but sometimes and a bit too often.

              To your resolving:

              “catching the close event”: does it mean that I can use:

              Sub Document_Close()
              code
              EndSub

              or is it more useful to use the event: DocumentBeforeSave

              I will try both in between all other tasks!

              regards
              Bj

            • #551489

              Hello Bj

            • #551491

              Thanks again,

              I have been looking at Microsoft MVP and found the following information:
              http://www.mvps.org/word/FAQs/MacrosVBA/In…ptSavePrint.htm

              It might be useful to have a look.

              regards
              Bj

            • #553039

              Hello hedgehog,

              This really does solve the problem. Thank you for sharing this information.

              -Ruth

            • #551644

              HI ‘BJ’,
              Don’t know if this is of any help, but FYI, I unzipped your form, entered data, saved it, reopened to add more, resaved with no problem at all. Here at home, I’m on Office97 (Word97SR2), standalone operation.

            • #551921

              Thanks for your testing. It appears that it does not happen every time. But anyway I have found a simple solution to prevent the failure happen:

              In ThisDocument I just added the following code:

              Public Sub document_close()
              ActiveDocument.Saved = True
              End Sub

              Whether this is correct to do I don’t know, but it works. The only thing that does not happen is that if some text is entered without saving or clicking the OK button in the DialogBox the user will not get the Word-message asking for saving or not.

              I will be looking into this in time, but now I’m very busy with other things that take most of my time.

              Thanks to everyone giving help!

              Best regards
              Bj

    Viewing 0 reply threads
    Reply To: Closing template causes Word(Not responding) (W2000 SR-1)

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

    Your information: