Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a way to do a find/replace within a doc that will replace a variable with fields from another doc.

So on doc one there are multiple instances of the following:

int <x/y>
int <x/y>
int <x/y>

On the sec doc I would have


I want to do a find on and replace with the data on the other doc starting at 3/1

So in the end my 1st doc would look like this

int 3/1
int 3/2
int 3/3

Is there a way to set this up? Thanks

share|improve this question
Perhaps you could record a macro and play it back – Sathya Sep 29 '10 at 18:03
would column copy/paste help? Alt+Mouse (or Alt+Shift+Arrow) to select, then Ctrl+C, Ctrl+V. – wilson Sep 30 '10 at 5:37

If you are wanting to create a script for this on a permanent basis, I don't think there is a way around doing a little bit of programming.

Something like this can be done as Sathya suggested, recording a macro, I wouldn't suggest this. Or possibly research simple batch scripting in windows (possibly a better solution). I myself think that using batch for loops with tokens is much more complicated than real programming languages.

I myself would prefer to do this in a real programming language, things like this are really easy in python, or any of the c languages.

Use StackOverflow as a resource for help if you decide to go this route.


Another suggestion I thought of is possibly using excel. I don't know what format you are forced to use, but if you can switch to a delimiter over what your format is now, you can quickly do all of this in excel. Otherwise, you have to dive into programming.

share|improve this answer
Mine was more like a half suggestion :) I really doubt this is possible without fair bit of scripting / programmiing – Sathya Sep 30 '10 at 3:58
@Sathya agreed, I do not think it is. – jsmith Sep 30 '10 at 13:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.