VBA for MS Word

davidku

New Member
Joined
Apr 24, 2012
Messages
12
Hi,

I am trying to find the first and the last row in a PAGE of the entire document. Having been exploring the Object Browser and tested some codes. However, I am not able to get it right.

Is there a function to find the first / last row in a page OR I need to write my own ?

Hope experts here can shed some lights. Thanks.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Without placing too fine a point on it:
1. Your find expression is not what I posted.
2. There is no evidence from your pic that you're doing anything more than a Find (Ctrl-F is for Find, Ctrl-H is for Find&Replace) - there is no 'Replace' expression visible; and
3. There is no evidence from your pic that you've set the 'use wildcards' option.

You can't realistically expect to get a meaningful result if you ignore the advice you've been given.
 
Upvote 0
Macropod,

Thanks for pointing out. Your Find/Replace works !

I just clicked on the "Use Wildcards". Silly me, I coded the expression and found nothing. Not sure what's wrong. It is just the option settings. No wonder, I input all the regular expression and it just don't work.

Sorry, I am just a newbie in MS Word and I appreciate your feedback a lot.
I learn a valuable lesson here. Thanks again.
 
Upvote 0
Let me add another post here so that it can be useful to others as well ..

Here are the interpretation for ^13 and ^p.

Code:
http://support.microsoft.com/kb/214204

I started the wrong direction, but now, I'll grab a copy of Microsoft Words to explore in details. I don't want to remove the line number one by one for over 300 pages. :LOL:
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top