Delete last paragraph mark in a selection 
Author Message
 Delete last paragraph mark in a selection

I'm trying to find a way to make my Find/Replace macro work.  What
I've found is that when I have a selection &:

Find: ^w^p & Replace with ^p

that Word adds an extra paragraph at the end of the selection.  I
would like to add a command that would delete this last paragraph only
but keep the same selection so that I could act on it.  In case that's
unclear, suppose I have

Paragraph 1
Paragraph 2
..................
Paragraph 10

I now select from the beginning of paragraph 7 thru the end of 10.  If
I then add an extra paragraph mark after paragraph 10, I want to
delete it & still have paragraph 7 thru 10 selected for the next
command.

Can this be done?
--
Thank you in advance.

Phil
P.S.  Responding in the newsgroup is fine, as I will check back.  If
you wish to respond to me directly, please remove the ZZ after my name
& ZZ before the domain name.



Sun, 04 Aug 2002 03:00:00 GMT  
 Delete last paragraph mark in a selection
Hi Phil,

To delete the last character in a selection, while leaving the selection
unchanged, use:

Selection.Characters.Last.Delete

--
Hope this helps.
Regards
ibby

Please post any replies to the **newsgroup** so that others in the newsgroup
may contribute or benefit.


| I'm trying to find a way to make my Find/Replace macro work.  What
| I've found is that when I have a selection &:
|
| Find: ^w^p & Replace with ^p
|
| that Word adds an extra paragraph at the end of the selection.  I
| would like to add a command that would delete this last paragraph only
| but keep the same selection so that I could act on it.  In case that's
| unclear, suppose I have
|
| Paragraph 1
| Paragraph 2
| ..................
| Paragraph 10
|
| I now select from the beginning of paragraph 7 thru the end of 10.  If
| I then add an extra paragraph mark after paragraph 10, I want to
| delete it & still have paragraph 7 thru 10 selected for the next
| command.
|
| Can this be done?
| --
| Thank you in advance.
|
| Phil
| P.S.  Responding in the newsgroup is fine, as I will check back.  If
| you wish to respond to me directly, please remove the ZZ after my name
| & ZZ before the domain name.
|
|



Mon, 05 Aug 2002 03:00:00 GMT  
 Delete last paragraph mark in a selection
Hi Ibby:
Thank you very much.
--
Phil
P.S.  Responding in the newsgroup is fine, as I will check back.  If you wish to
respond to me directly, please remove the ZZ after my name & ZZ before the
domain name.


Tue, 06 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Identifying the last paragraph mark or last break on a page

2. Replacing all paragraph marks in a certain style EXCEPT the last one in this style

3. Is Selection a Paragraph Mark?

4. Delete from beginning of line to paragraph mark

5. Delete last paragraph

6. Delete range of paragraphs based on start text of paragraphs

7. Excel "paragraph marks" to Word paragraph marks?

8. checking to see if show / hide paragraph marks is on or off

9. Searching for paragraph marks

10. Paragraph marks: Testing for them.

11. Paragraph mark

12. Add Numbers before Each Paragraph Mark

 

 
Powered by phpBB® Forum Software