Teen Programmers Unite  


Return to forum top

Simple MS Word help needed

Posted by gwells [send private reply] at June 10, 2003, 12:16:22 AM

I am not a programmer. I want to be able to do something in MS Word, and it seems like it should be possible, but I can't figure out how to do it. Here's what I want to do: (1) Search for a word (say, "chocolate"). (2) Select and copy all of the text between that word and the next double character return (Word notates that as ^p^p). (3) Paste the text into a blank document. (4) Search for the next instance of the word, and repeat...

My attempts have been pitiful failures, mainly because I have no idea how to do this. If this is not too difficult to do (i.e., will not require you to spend much time on a reply), I would _very_ much appreciate your help.



Posted by gwells [send private reply] at June 10, 2003, 12:18:25 AM

God, I'm sorry if I posted this in the wrong forum! Please forgive me. I'm a novice.

Posted by sphinX [send private reply] at June 10, 2003, 01:12:55 AM

So basically what you're trying to write is a Word macro? Generally, this is done in Visual Basic I believe. Check google for information on how to write macros.

Posted by Mike_L [send private reply] at June 11, 2003, 07:29:02 PM

With MSOffice macros usually you want to do a Record Macro procedure where you do the operation once and then it gets translated into Visual Basic code. Then you can edit the code to make it just right. Once you have the macro working, you can make a button for it on the toolbar and then click away =)

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.