Results 1 to 10 of 24

Thread: Get Pictures from Word Documents in All Sub Folders

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #20
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Hi
    Quote Originally Posted by prkhan56 View Post
    The code is in the file you sent me back
    That explains why the macro stops when at the close - The macro is there , running, but then you close it, so its gone.
    If you run a macro that is in a document and that macro closes the document, then nothing can happen after the close because both the document and macro is no longer there.
    It is like driving a car on a journey, and on the way, in the middle of the journey, God comes and takes your car and the engine away. So the journey stops

    Like this
    WORD: [document and start macro running ]
    WORD: [document and macro running ]
    WORD: [document and macro running - macro closes the document ]
    WORD: [ _________________________ ] - all is gone. There is nothing there - no document , no running macro. Macro cannot finish - there is no macro - its gone because you closed it

    Important: You can stop a macro like this by closing the document with the macro in it. But it is dangerous to do it.
    It is like if you are in a plane and want to land. So you take the engine away. The plane will come down. If you are lucky it will come down and stop. If you are unlucky the plane may crash. You may die.
    You can stop a macro like this by closing the document with the macro in it. If you are lucky the macro will stop. If you are unlucky your computer may crash. It may die.




    Also: A .docx cannot hold a macro - you can try it - try to save a .docx file with a macro in it. - It will not work
    A macro can go in normal template or in a docm file

    Good luck
    Please let us know how you get on.
    Alan
    Last edited by DocAElstein; 09-29-2021 at 03:22 PM.

Similar Threads

  1. Replies: 1
    Last Post: 08-26-2021, 11:42 AM
  2. Replies: 3
    Last Post: 07-09-2020, 02:17 AM
  3. Replies: 7
    Last Post: 08-24-2015, 10:58 PM
  4. Replies: 9
    Last Post: 07-26-2013, 02:34 PM
  5. Replies: 1
    Last Post: 10-16-2012, 01:53 PM

Posting Permissions

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