VBA Code

ykbhatia

Board Regular
Joined
Jul 1, 2003
Messages
81
This is required for a Word Document. I have a 500 pages word document. I want to run a VBA code to lookup a number on the page and add preceding numbers to it and convert it to a different font and paste it on that page.

Eg.

Page 1

Number: 123456

Need to lookup the number add 01000 to it i.e. 01000123456, change the font and past it on an area on the same page. This needs to be done to all the 500 pages of the document.

Can anyone provide a solution for this as I am not too familiar with VBA.

Thanks.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
This is required for a Word Document.
So you posted it in an Access forum?.:)

Seriously though I would suggest you turn on the macro recorder (Tools>Macros>Record new macro...)
when you do this find/replace/format manually for a few pages.

That should generate code that can be adapted for all 500 pages.
 
Upvote 0

Forum statistics

Threads
1,225,229
Messages
6,183,729
Members
453,185
Latest member
radiantclassy

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