Q1:
Actually, i have to insert the page id like <a id="page_1"/>, <a id="page_2"/>... n
in end of the page, so i have the below code for Insert Page numbers in each page.
Sub pagenosadd()
With ActiveDocument.Sections(1)
.Footers(wdHeaderFooterPrimary).PageNumbers.add _
PageNumberAlignment:=wdAlignPageNumberLeft, _
FirstPage:=True
End With
End Sub
After run the macro, i have to find the page numbers and replace with <a id="page_1"/>, <a id="page_2"/>...<a id="page_n"/>
How to find and replace the footers?
Q2: How to Convert the footers to normal text in same page?
Q3: Or is it possible to directly add footers as <a id="page_1">...n
and convert as text on the page?
It will be really very helpful to increase my skills?
EDIT:
Now, I have tried the below code for inserting footer as <a id="page_1"/>...n
Sub addfootaspage()
Dim k As Integer
For k = 0 To ActiveDocument.Sections.Count
k = k + 1
With ActiveDocument.Sections(k)
.Footers(wdHeaderFooterPrimary).Range.Text = "<a id=""page_" & k & "> "
End With
Next k
End Sub
But inserted as <a id="page_1"/>
to all the page, it's not counting the values.