Page {PAGE} of {NUMPAGES} in Word
-
I am doing a report programmatically(with COM) using Word 2003. First I build the report and print it. Then the idea is to remove all headers and footers(with logos etc) and print it again with only Page {PAGE} of {NUMPAGES} in the header. I can remove the headers and footers but can't add the pagenumbering . There probably is som escape code I should use or then it is just impossible. Any ideas? Of course I could use two different .dot files but is too slow for me. jhaga It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business. Henry David Thoreau -- modified at 6:50 Tuesday 2nd May, 2006
-
I am doing a report programmatically(with COM) using Word 2003. First I build the report and print it. Then the idea is to remove all headers and footers(with logos etc) and print it again with only Page {PAGE} of {NUMPAGES} in the header. I can remove the headers and footers but can't add the pagenumbering . There probably is som escape code I should use or then it is just impossible. Any ideas? Of course I could use two different .dot files but is too slow for me. jhaga It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business. Henry David Thoreau -- modified at 6:50 Tuesday 2nd May, 2006
-
Try to start record a macro, and do manually what you want. After that copy and modify macro code to your language. This helps me, when I was making export to Excel. Best regards, Alexey.
Thanks, it is in VB: NormalTemplate.AutoTextEntries("Page X of Y").Insert Where:=Selection. _ Range, RICHTEXT:=True had missed that it is richtext :doh: jhaga It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business. Henry David Thoreau