H
Hari Prasadh
Hi,
I messed up in explaining my requirement in my previous post ("text
replacing based on a true condition") in
the --microsoft.public.word.vba.beginners -- hence rewording the same here.
(am not conversant with word other than manual formatting and using it as a
Scratch application. I work primarily with Excel)
a) Whats' the syntax for programmatically knowing the actual page number of
a document. Like if the cursor is in page 65 , I should be able to get the
value 65.
I tried the following
Msgbox activedocument.selection.pagenumber
but getting a Run-time error "438" - object doesnt support this property or
method.
b) Whats the syntax for programmatically looping through each sheet in the
document. Like I can write the following
For I = 1 to NoOfPagesInTheDocument
But, how would I find the value of NoOfPagesInTheDocument.
Basically I want the value for total no of pages in that document. This
value also gets displayed in the Word taskbar/information area in the
bottom. Like where it says 45/750, which means am at the 45th page and 750
is the NoOfPagesInTheDocument.
c) Whats the syntax for restricting the Search/Find/replace Feature to a
particular page only. Like , if am in a For Loop as described in b) and if I
want to restrict my find/replace only to the present page, then how do I do
it?
Please guide me.
Thanks a lot,
Hari
India
I messed up in explaining my requirement in my previous post ("text
replacing based on a true condition") in
the --microsoft.public.word.vba.beginners -- hence rewording the same here.
(am not conversant with word other than manual formatting and using it as a
Scratch application. I work primarily with Excel)
a) Whats' the syntax for programmatically knowing the actual page number of
a document. Like if the cursor is in page 65 , I should be able to get the
value 65.
I tried the following
Msgbox activedocument.selection.pagenumber
but getting a Run-time error "438" - object doesnt support this property or
method.
b) Whats the syntax for programmatically looping through each sheet in the
document. Like I can write the following
For I = 1 to NoOfPagesInTheDocument
But, how would I find the value of NoOfPagesInTheDocument.
Basically I want the value for total no of pages in that document. This
value also gets displayed in the Word taskbar/information area in the
bottom. Like where it says 45/750, which means am at the 45th page and 750
is the NoOfPagesInTheDocument.
c) Whats the syntax for restricting the Search/Find/replace Feature to a
particular page only. Like , if am in a For Loop as described in b) and if I
want to restrict my find/replace only to the present page, then how do I do
it?
Please guide me.
Thanks a lot,
Hari
India