About adding autonumber with vba in MSWord
I have a variable called Rng1 (range) stored the followings:
(a) The 1st line
(b) The second line with some images as inlineshape
and so on....
i want to paste it onto another Range called Rng2.
I use the following lines
ActiveDocument.Rng2.FormattedText = Rng1
It works, it give me the following
(a) The 1st line
(b) The second line with some images as inlineshape
and so on....
Then I want to add a auto numbering on the 1st line. I would like the result like the following
1. (a) The 1st Line
(b) The second line with some images as inlineshape
and so on
I tried the following line
ActiveDocument.Rng2.paragraph(1).ListFormat.ApplyNumberDefault
But the result give me
1. The 1st Line
(b) The second line with some images as inlineshape
and so on
It seems some auto correct function in Word eat my "(a)" and replace it with "1."
Any ideas ?
Many Thanks
*first time to post in this forum, forgive me if i made any mistakes.