Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
I have a word document (taken from ie-spyad in Notepad, and want to use it
fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Insert a paragraph mark at the beginning of the first line, then press
Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Thanks Herb, but I'm a bit lost.
I had already tried the find/replace fixture, so it's nice to know I was on the right rack, but... Whar do you mean by paragraph mark at the beginning of the first line? What do I put in Find? 'control p' does not place anything there! I guess it is not Control p that you mean. Help.... JB "Herb Tyson [MVP]" escreveu na mensagem ... Insert a paragraph mark at the beginning of the first line, then press Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#4
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Ok, I got what you mean by paagraph mark, and managed to get something out
of the find/replace, but must be dong something wrong as it seems to place the 127.0.0.1 everywhere except where I want it to be. Possibly, I am not getting the control p as you mean it. JB "Herb Tyson [MVP]" escreveu na mensagem ... Insert a paragraph mark at the beginning of the first line, then press Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#5
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Where the lines start with letters (the site address) I get nothing Where the line starts wirth asterisks it places the 127.0.0.1 What am doing wrong? JB "Herb Tyson [MVP]" escreveu na mensagem ... Insert a paragraph mark at the beginning of the first line, then press Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#6
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Note: when I said ^p, I meant exactly that--a caret followed by a lowercase
p. Not Ctrl+p, but ^p, literally. That's the Find/Replace symbol for matching a normal paragraph mark. From what you're saying, it sounds like there are non-standard paragraph breaks for some lines (i.e., something that doesn't match ^p) and regular paragraph breaks for other lines. When I said "insert a paragraph mark at the beginning," I meant simply "press Enter", and I was assuming that your hosts file began with an ip number, rather than with a comment (line beginning with #). Let's try this a different way (and I assume you're working with a copy of the hosts file): Select all of the lines you want to change--this will let find/replace affect only the selected lines. Press Ctrl+H Set Find what: to ^13 (this will match normal and non-standard paragraph marks) Set Replace with: to ^p127.0.0.15 spaces (I.e., press the space bar 5 times) Click Replace all. Say No to the prompt asking if you want to apply the find/replace to the rest of the file. You will need to add 127.0.0.1 manually to the first item, and remove the extraneous 127.0.0.1 at the end of the list. Does that do it? -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... Where the lines start with letters (the site address) I get nothing Where the line starts wirth asterisks it places the 127.0.0.1 What am doing wrong? JB "Herb Tyson [MVP]" escreveu na mensagem ... Insert a paragraph mark at the beginning of the first line, then press Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
#7
Posted to microsoft.public.word.newusers
|
|||
|
|||
Insert in list
Thank you very much Herb
It worked! JB "Herb Tyson [MVP]" escreveu na mensagem ... Note: when I said ^p, I meant exactly that--a caret followed by a lowercase p. Not Ctrl+p, but ^p, literally. That's the Find/Replace symbol for matching a normal paragraph mark. From what you're saying, it sounds like there are non-standard paragraph breaks for some lines (i.e., something that doesn't match ^p) and regular paragraph breaks for other lines. When I said "insert a paragraph mark at the beginning," I meant simply "press Enter", and I was assuming that your hosts file began with an ip number, rather than with a comment (line beginning with #). Let's try this a different way (and I assume you're working with a copy of the hosts file): Select all of the lines you want to change--this will let find/replace affect only the selected lines. Press Ctrl+H Set Find what: to ^13 (this will match normal and non-standard paragraph marks) Set Replace with: to ^p127.0.0.15 spaces (I.e., press the space bar 5 times) Click Replace all. Say No to the prompt asking if you want to apply the find/replace to the rest of the file. You will need to add 127.0.0.1 manually to the first item, and remove the extraneous 127.0.0.1 at the end of the list. Does that do it? -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... Where the lines start with letters (the site address) I get nothing Where the line starts wirth asterisks it places the 127.0.0.1 What am doing wrong? JB "Herb Tyson [MVP]" escreveu na mensagem ... Insert a paragraph mark at the beginning of the first line, then press Ctrl+H. Set: Find what:^p Replace with:^p127.0.0.1spaces spaces means that you press the space bar however many times you think appropriate, since you presumably want at least one space separating the local IP from whatever follows. After replacing all, delete the blank line at the beginning and the unneeded 127.0.0.1 at the end. And... don't forget to save the file as text (you might need to rename the file afterward to remove an unwanted .txt from the name)... and fix any lines that you didn't really want changed (such as those beginning with #). -- Herb Tyson MS MVP Author of the Word 2007 Bible Blog: http://word2007bible.herbtyson.com Web: http://www.herbtyson.com "JB" wrote in message ... I have a word document (taken from ie-spyad in Notepad, and want to use it fr a HOSTS file. For that I need to insert 127.0.0.1 infront of each existing line. How do do that in Word 2003? Thank you JB |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I insert drop down list in the labels? | Microsoft Word Help | |||
How do I insert symbols not in the symbol list? | Microsoft Word Help | |||
how do I insert a drop down list | Microsoft Word Help | |||
insert a variable length List | Microsoft Word Help | |||
How do I insert a new symbol into the list of symbols? | Microsoft Word Help |