So what I would like to do is to do is for the macro to find out the number of pages in the document through:
pages.count
As far as I know, using the search and replace method is in this case not possible, as I cant insert a variable into the
replacement.text
Another method I tried is simply first find the location of the part of the text that should be replaced, select it and then use the
Selection.TypeText Text:=Pages.Count
but this results in an object required error. So this also doesn't work. As such I am sort of out of ideas which method to use to replace the text.
Would someone have an idea how to approach this issue?