A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Erase a line of text beginning with known word(s)



 
 
Thread Tools Display Modes
  #1  
Old September 4th, 2008, 07:52 PM posted to microsoft.public.word.docmanagement
jbly
external usenet poster
 
Posts: 19
Default Erase a line of text beginning with known word(s)

I have a file from another application that I edit with Word. I want erase
the entire line for every instance a line begins with PT_ORIG*. I tried to
search for all instances of PT_ORIG* (then Special manual line break), but it
doesn't seem to find it. Also what would I put in the replace box because
that will leave a blank line in the file?
Ads
  #2  
Old September 5th, 2008, 01:14 AM posted to microsoft.public.word.docmanagement
Jay Freedman
external usenet poster
 
Posts: 9,488
Default Erase a line of text beginning with known word(s)

On Thu, 4 Sep 2008 11:52:01 -0700, jbly wrote:

I have a file from another application that I edit with Word. I want erase
the entire line for every instance a line begins with PT_ORIG*. I tried to
search for all instances of PT_ORIG* (then Special manual line break), but it
doesn't seem to find it. Also what would I put in the replace box because
that will leave a blank line in the file?


No reasonable answer can be given until you answer these three questions:

- Is there an actual asterisk character in the text after the G, or are you
using the asterisk as a wildcard?

- Is there other text between PT_ORIG* and the end of the line?

- Is there a manual line break (the character inserted by Shift+Enter), not a
paragraph mark or column break or something else, at the end of the line?


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3  
Old September 8th, 2008, 09:39 PM posted to microsoft.public.word.docmanagement
jbly
external usenet poster
 
Posts: 19
Default Erase a line of text beginning with known word(s)

1. There is no asterisk. I was using it as a wildcard
2. Yes, there is text between PT_ORIG and the end of the line
3. The end of the line is just a return (ENTER) I think. It definitely isn't
the shift+enter.


"Jay Freedman" wrote:

On Thu, 4 Sep 2008 11:52:01 -0700, jbly wrote:

I have a file from another application that I edit with Word. I want erase
the entire line for every instance a line begins with PT_ORIG*. I tried to
search for all instances of PT_ORIG* (then Special manual line break), but it
doesn't seem to find it. Also what would I put in the replace box because
that will leave a blank line in the file?


No reasonable answer can be given until you answer these three questions:

- Is there an actual asterisk character in the text after the G, or are you
using the asterisk as a wildcard?

- Is there other text between PT_ORIG* and the end of the line?

- Is there a manual line break (the character inserted by Shift+Enter), not a
paragraph mark or column break or something else, at the end of the line?


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

  #4  
Old September 9th, 2008, 12:39 AM posted to microsoft.public.word.docmanagement
Jay Freedman
external usenet poster
 
Posts: 9,488
Default Erase a line of text beginning with known word(s)

In that case, in the Replace dialog, click the More button and check the "Use
wildcards" box, then enter this in the Find What box:

PT_ORIG*^13

The Special Manual line break that you used before looks specifically for the
Shift+Enter character, not a regular Enter. For reasons that aren't clear to
anyone outside Microsoft, you can't use the ^p code for a regular paragraph mark
when you're doing a wildcard search, so you must use the ASCII code (^13)
instead.

Leave the Replace With box empty and click the Replace All button. Because the
paragraph mark is part of the Find What text, it will be removed along with the
text, and there won't be any blank line left behind.


On Mon, 8 Sep 2008 13:39:02 -0700, jbly wrote:

1. There is no asterisk. I was using it as a wildcard
2. Yes, there is text between PT_ORIG and the end of the line
3. The end of the line is just a return (ENTER) I think. It definitely isn't
the shift+enter.


"Jay Freedman" wrote:

On Thu, 4 Sep 2008 11:52:01 -0700, jbly wrote:

I have a file from another application that I edit with Word. I want erase
the entire line for every instance a line begins with PT_ORIG*. I tried to
search for all instances of PT_ORIG* (then Special manual line break), but it
doesn't seem to find it. Also what would I put in the replace box because
that will leave a blank line in the file?


No reasonable answer can be given until you answer these three questions:

- Is there an actual asterisk character in the text after the G, or are you
using the asterisk as a wildcard?

- Is there other text between PT_ORIG* and the end of the line?

- Is there a manual line break (the character inserted by Shift+Enter), not a
paragraph mark or column break or something else, at the end of the line?



--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #5  
Old September 11th, 2008, 01:38 PM posted to microsoft.public.word.docmanagement
jbly
external usenet poster
 
Posts: 19
Default Erase a line of text beginning with known word(s)

Thanks, that worked.

Jason

"Jay Freedman" wrote:

In that case, in the Replace dialog, click the More button and check the "Use
wildcards" box, then enter this in the Find What box:

PT_ORIG*^13

The Special Manual line break that you used before looks specifically for the
Shift+Enter character, not a regular Enter. For reasons that aren't clear to
anyone outside Microsoft, you can't use the ^p code for a regular paragraph mark
when you're doing a wildcard search, so you must use the ASCII code (^13)
instead.

Leave the Replace With box empty and click the Replace All button. Because the
paragraph mark is part of the Find What text, it will be removed along with the
text, and there won't be any blank line left behind.


On Mon, 8 Sep 2008 13:39:02 -0700, jbly wrote:

1. There is no asterisk. I was using it as a wildcard
2. Yes, there is text between PT_ORIG and the end of the line
3. The end of the line is just a return (ENTER) I think. It definitely isn't
the shift+enter.


"Jay Freedman" wrote:

On Thu, 4 Sep 2008 11:52:01 -0700, jbly wrote:

I have a file from another application that I edit with Word. I want erase
the entire line for every instance a line begins with PT_ORIG*. I tried to
search for all instances of PT_ORIG* (then Special manual line break), but it
doesn't seem to find it. Also what would I put in the replace box because
that will leave a blank line in the file?

No reasonable answer can be given until you answer these three questions:

- Is there an actual asterisk character in the text after the G, or are you
using the asterisk as a wildcard?

- Is there other text between PT_ORIG* and the end of the line?

- Is there a manual line break (the character inserted by Shift+Enter), not a
paragraph mark or column break or something else, at the end of the line?



--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.