View Single Post
Old 06-12-2009, 02:51 AM   #8
LeoRivas
Junior Member
LeoRivas began at the beginning.
 
LeoRivas's Avatar
 
Posts: 4
Karma: 10
Join Date: Jun 2009
Device: SONY PRS-500
Hi Alan

Do this in MSWord:

1.-Open Word
2.-Create a new doc or open an existing one
3.-Press alt-F11 (the same as selecting tools/macro/visual basic editor)
4.-Paste the script code into the code editor and save it
5.-To run, select 'RemoveParagraph' on tools/macro/macros and press run (you may also assign a button on the toolbar)

*Tip: if on step 3, vb editor opens but with no document, on left hand bar, right clic on Normal, then select Insert/Module. You can add macros to the current document or to Normal.dot file, I recommend creating macros on 'Normal' template , because that way the macro will be available for this and other docs.

*Tip2: As I said in the post above, this script is not that elegant, is more like a work in progress, so when you run it, you might be asked several times that "search string not found, start from beginning?" thing, but just click ok, it will do its job. This is because I first created the script to be executed on some selected text.

The RemovePageNumber function is to clear that annoying page numbers that appear everywhere when you copy/paste to word from pdf, the only drawback is that there is a risk that it may delete real numbers from the text... well, it will do it only if is followed by a carriage return... that is another thing to improve.

You are of course invited to modify it as you like with the only condition that if you improve it, share it with the rest!

Cheers
Leo
LeoRivas is offline   Reply With Quote