Hello,
At work I am using a UserForm to add image based headers and footers (H&F) to the active document. I created the UserForm in my personal.xlsb file so it's accessible everywhere.
For this example though, I created a test macro in the attached file. The file already has the image H&F and for the 1st section I also added the page numbers to see how it should look like (adding page numbers is what I want to do).
Also attached are the 4 images that are used as headers and footers for testing purposes (4 because 2 are for portrait and 2 for landscape pages).
If you want to test the code, please make a folder named HeadFoot under C:\ and put the 4 images in there (the code grabs them from eg. C:\HeadFoot\EXFORUM Portrait SUS.png)
I am trying to add page numbers (page 1 / 1 etc.) to footer right above the existing image (see section 1 of the attached file).
The page numbers should go continuously, regardless of how many sections I have and which are not linked because landscape H&F image is different than portrait H&F image.
I tried recording a macro, but when recording in Word the cassette cursor shows and I can't really do much - can't select image with mouse, can't select text with mouse etc.
So I have trouble including a code like the one below into my already working UserForm code in order to show continuous page numbers in all sections like in section 1 of the attached file.
This is the snippet that I normally use to add page numbers to current cursor position:
Could someone help me?Please Login or Register to view this content.
Thanks in advance for your time.
Bookmarks