Hello Alan,
The code is in the file you sent me back.
Anyway, I want to thank you for all the time and help you did for me.
I will put it on other forum as my expertise in VBA is very minimal.
Thanks once again.
Hello Alan,
The code is in the file you sent me back.
Anyway, I want to thank you for all the time and help you did for me.
I will put it on other forum as my expertise in VBA is very minimal.
Thanks once again.
HiThat 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.
….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
If you are my enemy, we will try to kick the fucking shit out of you…..
Winston Churchill, 1939
Save your Forum..._
KILL A MODERATOR!!
Bookmarks