moving a paragraph 
Author Message
 moving a paragraph

I would like to have a subroutine that takes the second to last paragraph
and makes it the third to last paragraph.

How do I then add vbLfCr so that there is a space between the rearranged
paragraphs?

Thanks in advance, Barth



Tue, 17 Jun 2003 23:58:17 GMT  
 moving a paragraph


Quote:
> I would like to have a subroutine that takes the second to last
paragraph
> and makes it the third to last paragraph.

> How do I then add vbLfCr so that there is a space between the
rearranged
> paragraphs?

> Thanks in advance, Barth

Hi Barth,

To be sure that I understand your question, do you want the following
to happen:

original

para a
...
para x
para y
para z

becomes:

para a
...
para y
para x
para z

which in turn becomes:

para a
....
para y

para x
para z

Is this right?

Richard (NL)
--
Machine Intelligence teaches us:
"I think, therefore I sum" which
translates into "Cogito Ergo Am"

Sent via Deja.com
http://www.deja.com/



Wed, 18 Jun 2003 03:53:01 GMT  
 moving a paragraph
Thank you for responding.

Sorry to confuse you with my wanting a space between paragraphs. How about
just telling me how to move the paragraph the second to last paragraph of a
range and make it the third to last.

para a
...

para x
para y
para z

becomes:

para a
...

para y

para x

para z



Wed, 18 Jun 2003 06:22:27 GMT  
 moving a paragraph


Quote:
> Thank you for responding.

> Sorry to confuse you with my wanting a space between paragraphs. How
about
> just telling me how to move the paragraph the second to last
paragraph of a
> range and make it the third to last.

> para a
> ...

> para x
> para y
> para z

> becomes:

> para a
> ...

> para y

> para x

> para z

Okay Barth,

Try this and see if it does the trick:

Sub omwissele()
Selection.EndKey unit:=wdStory                'go to end
Selection.MoveUp unit:=wdParagraph            'paragraph up
Selection.MoveUp unit:=wdParagraph            'paragraph up
Selection.MoveUp unit:=wdParagraph            'paragraph up
ActiveDocument.Bookmarks("\para").Range.Select 'select
Selection.Cut
Selection.MoveDown unit:=wdParagraph
Selection.Paste
Selection.MoveUp unit:=wdParagraph
Selection.InsertBefore vbCr
End Sub

Richard
--
Machine Intelligence teaches us:
"I think, therefore I sum" which
translates into "Cogito Ergo Am"

Sent via Deja.com
http://www.deja.com/



Wed, 18 Jun 2003 20:21:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Detecting cursor move between paragraphs

2. How to move to the beginning of a paragraph

3. Moving paragraphs based on style

4. Moving cursor to specific paragraph

5. Moving back one paragraph from bookmark

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

7. select paragraph, prompt, select next paragraph

8. Linking a paragraph to another paragraph.

9. move shape between pages / Move-Event ?

10. Moving Pictures?!!!!!!!!! Need help to move a picture

11. move a mouse pointer to a different location without moving the mouse

12. Move one form - the other moves with it?

 

 
Powered by phpBB® Forum Software