Hi, Vivka! Thank you very much for your code variant. Except for "wdGoToPage, PgNum" (which should be "wdGoToPage, Name:=PgNum") it works all right. However, like mine it deletes all the pages of the docx when inserted into a larger (very large) macro.
If I use a Selection version of the code, it works also when inserted into the larger macro. Surely there must be a way to make the Range version work irrespective of the code context!
|