Re: Macro to delete between lines

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dave Lett (dlett_at_NOsmconst.comSPAM.com)
Date: 02/10/05


Date: Thu, 10 Feb 2005 11:13:06 -0500

Hi Marty,

The following will delete everything from #111# to #222# including #111# and
#222#

With Selection
    .HomeKey Unit:=wdStory
    .Find.Execute FindText:="#111#"
    .ExtendMode = True
    .Find.Execute FindText:="#222#"
    .delete
End With

HTH

"Marty" <Marty@discussions.microsoft.com> wrote in message
news:5694BE70-03A1-4A98-8050-C4AEF6BD6712@microsoft.com...
> Hi-
>
> I thank everyone who has been helping me.
>
> Sorry to be a pest, but I have not yet figured out how to do this.
>
> I have a Word97 document with "#111#" and a few pages later, I have
"#222#".
>
> Can a macro be written to delete everything from #111# to #222#?
>
> No matter what I try, I get run-time error 438 "Object doesn't support
this
> opperation or method."
>
> Thanks,
>
> Marty



Relevant Pages

  • Re: Trolls like to ruin the exchange of ideas
    ... HTH. ... Official AFA-B Bully, Pest, Antagonist, Government/Media Disinformation Agent, "Dr. ... Green" Sockpuppet, and Lemming * Chief AFA-B Vote Rustler ...
    (sci.astro)
  • Re: Required dll in XP?
    ... Joe and HTH for helping me with my problem with a virus removal. ... You were brilliant and your help was very much appreciated. ...
    (microsoft.public.windowsxp.help_and_support)
  • Macro to delete between lines
    ... I thank everyone who has been helping me. ... Sorry to be a pest, but I have not yet figured out how to do this. ... Marty ...
    (microsoft.public.word.vba.general)
  • Re: How do I restore a GOOD file removed by virus chech
    ... newsgroups are for helping. ... When mama told you if you had nothing good ... don't say anything she should've cleaned your ears out. ...
    (microsoft.public.security.virus)
  • Re: Im an MCSE
    ... start helping people!!! ... HTH ... - Smoking is one of the leading causes of statistics. ... Prev by Date: ...
    (microsoft.public.cert.exam.mcse)