Help!

Paragraph selection in word macro


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Formating Long Docs RSS
Next:  Master Documents using Share Point Portal Server  
Author Message
alan.remillard
External


Since: Jul 09, 2007
Posts: 1



PostPosted: Mon Jul 09, 2007 5:24 am    Post subject: Paragraph selection in word macro
Archived from groups: microsoft>public>word>formatting>longdocs (more info?)

hello all,
I have a standard word document produced by a macro. Part of this
macro highlights a particular word in red. I need to extend the macro
to then search for this RED word and then move it and ita associated
paragraph to a new page. There could potentially be any number of RED
words and paragraphs to move. Moving the RED word is relatively easy
but moving its associated paragraph I can't do. From within word I can
highlight the paragraph by left clicking it 3 times, how do I achieve
this from within a macro?

If it can be selected then it is easy to move.

regards

Alan
Back to top
Jonathan West
External


Since: Dec 18, 2003
Posts: 112



PostPosted: Mon Jul 09, 2007 4:12 pm    Post subject: Re: Paragraph selection in word macro [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<alan.remillard.DeleteThis@googlemail.com> wrote in message
news:1183983842.604901.49610@c77g2000hse.googlegroups.com...
> hello all,
> I have a standard word document produced by a macro. Part of this
> macro highlights a particular word in red. I need to extend the macro
> to then search for this RED word and then move it and ita associated
> paragraph to a new page. There could potentially be any number of RED
> words and paragraphs to move. Moving the RED word is relatively easy
> but moving its associated paragraph I can't do. From within word I can
> highlight the paragraph by left clicking it 3 times, how do I achieve
> this from within a macro?
>
> If it can be selected then it is easy to move.
>

Selection.Paragraphs(1).Range.Select

Or better still, make your macro operate on the range directly without
selecting it.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Formating Long Docs All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum