Quote:
Originally Posted by Bikram
If we adjust the pagenumber manually the problem doesn't exist. But if we attempt it with code the first page header will be expanded and a paragraph will appear. Is there a way to change the page numbers without causing expansion of Header in the first page?
I have attached the snipped images of before and after running the code. Please have a look.
|
The issue is a result of your code. Until you ran your code that header did not exist. The empty header was created because your code uses the Selection object. This is one of the many reasons why use of the Selection should be avoided. Instead, you should access the objects directly, as demonstrated in the answer from macropod.