Re: Deleting objects on page by Stefan
Stefan
Thu Aug 03 02:19:40 CDT 2006
Yes, it is a known fact that the "\page" bookmark does not include the
final paragraph mark of a document. I would have commented on this
earlier, but in a previous message you stated that the text boxes were
anchored to the *first* paragraph of the page... Anyway, I'm glad you
got it sorted!
--
Stefan Blom
Microsoft Word MVP
"Roderick O'Regan" wrote in message
news:60t1d2ph38cjjgbj4grlac0moimod7sn0f@4ax.com...
> Thanks for the offer Stefan but I might have resolved the problem.
>
> This problem always seemed to happen when the objects were on the
last
> page of the document.
>
> I had the code:
> Activedocument.bookmarks("\Page").range.select
> Selection.delete
>
> This deleted all the text within the margin but not the surrounding
> objects.
>
> These were anchored to the last paragraph in the last page.
>
> Of course, when I looked at the Help topic a little more deeply I
saw
> the sentence which said that the \Page built-in bookmark does not
> select the last paragraph mark on the last page.
>
> As the objects were anchored to this hence they were not deleted.
>
> I resolved it then with:
> .MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
> .Delete
>
> That seemed to do the trick! Objects removed!
>
> Thanks for your help.
>
> Regards
>
> Roderick
>
> On Wed, 2 Aug 2006 12:06:24 +0200, "Stefan Blom"
<no.spam@please.xyz>
> wrote:
>
> >This is strange. If you want to, I could take a look at the
document.
> >Email it to sbm01004@hotmail.com.