none
How best to reload a document RRS feed

  • Question

  • Hi all;

    I have a case where Word is on a Document that we generated for Word. What I need to do at times is generate a new copy of the document and then have that Word Document throw away what it has and read in that newly generated document as the document. And then go back to displaying the same page it was on before.

    I can close the document and then call Documents.Open() to get the new copy. Is there a better way to do this?

    thanks - dave


    Very funny video - What's your Metaphor?
    • Changed type DavidThi808 Sunday, March 6, 2011 8:17 PM
    Thursday, February 24, 2011 8:08 PM

Answers

All replies

  • You could use ActiveDocument.Reload but this displays a prompt that cannot be suppressed by setting Application.DisplayAlerts = False.
    Regards, Hans Vogelaar
    Thursday, February 24, 2011 9:59 PM
  • Any suggestions for a way that does not prompt the user?

    thanks - dave


    Very funny video - What's your Metaphor?
    Sunday, March 6, 2011 8:18 PM
  • Question - is there a way to close the document in a window, but keep the window open? Because I could then close the document and then load into that window the new document. My use case is this will always happen when there is another Word document open so closing a document the default action for Word is to then close the window.

    ??? - thanks - dave


    Very funny video - What's your Metaphor?
    • Edited by DavidThi808 Wednesday, March 9, 2011 4:43 PM
    Sunday, March 6, 2011 8:50 PM
  • Document windows (inside the Word window) belong to the document - no document, no document window, sorry!
     

    Enjoy,
    Tony
    www.WordArticles.com
    • Marked as answer by DavidThi808 Wednesday, March 9, 2011 4:43 PM
    Wednesday, March 9, 2011 12:07 PM
  • If I don't like your answer do I still have to mark it as an answer :(

    I guess I'll have to close and then create new windows. Oh well...

    thanks - dave


    Very funny video - What's your Metaphor?
    Wednesday, March 9, 2011 4:44 PM
  • I can see where you're coming from with this, and I scratched my head for a long while trying to think of a way to help, but I can't see how you can do it without a lot of effort and an error-prone end result.
     
    I would personally prefer it if the concept of being answered was done away with, but Microsoft seem to like it and to want everything so marked - they clearly don't care what is marked as the answer so long as something is, and it is their forum so we have to play along.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Wednesday, March 9, 2011 5:58 PM
  • I was kidding. What you gave is the answer and so I agree it should be marked as such. It's just sometimes when the answer is "Word doesn't do that" I want to say "but it has to - I need it."

    thanks - dave


    Very funny video - What's your Metaphor?
    Wednesday, March 9, 2011 6:27 PM
  • I know :). Generally the answer is yes, Word can do it, although sometimes it's convoluted and should come with a warning, but you come up with so many out-of-the-ordinary questions! I try to answer some of them, but I watch many others - where, as often as not, Microsoft seem to struggle.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Thursday, March 10, 2011 9:33 AM