+ Reply to Thread
Results 1 to 4 of 4

Trouble closing MS Word document from Excel macro

  1. #1
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102

    Angry Trouble closing MS Word document from Excel macro

    Hi. I am dabbling in creating a Word document from within an Excel macro. Using the following code, I have created a blank Word document:

    Please Login or Register  to view this content.
    However, when I try to close Word, I get the following error message:

    "This file is in use by another application or user. C:\..\..\Normal.dot"

    And then prompts me to save a template file.

    Why is it forcing me to do this? I haven't even done anything with the document yet.

    If I cancel the save template prompt and try to close Word again, it says:

    "Changes have been made that affect the global template, Normal. Do you want to save those changes"?

    What does all this mean???? I'm not a Word expert I'm afraid!

  2. #2
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102
    bumping up the list... hopefully someone can help???

  3. #3
    Registered User
    Join Date
    08-25-2006
    Posts
    30
    Hiya,

    Not really an expert on controlling Word from Excel myself, but I do know that Normal.dot is a kind of global template and, I think, when you create a new blank Word document, Normal.dot is the basis. I can't tell from your code what changes are being made to this template but I'd be tempted not to save any....

    One suggestion that may perhaps make a difference is to build a SaveAs line into your VBA code, so that the new file is created and then saved as a document.

    The code would look a bit like this:

    Please Login or Register  to view this content.
    Dunno if that will help, it's just a guess.

    s.

  4. #4
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102
    Thanks, I'll give it a go later and let you know what happens!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1