Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.newusers
Oggy Oggy is offline
external usenet poster
 
Posts: 6
Default Word: select text, search, delete, in a macro, how?

I want to record a macro where I search for the beginning of some text
I'm interested in, select a section of text, search for the end of the
text I'm interested in, and then delete the resulting selection. The
trouble is that the section can vary in size. For example, I would
want to delete everything between div and /div:

div id="productdetails"
table border="0" cellspacing="0" cellpadding="0"
tr
td class="header" colspan="2"Product Details/td
/tr
tr valign="top"
td class="fieldlabel" nowrap="1"Dewey/td
td class="fieldvalue"813/td
/tr
tr valign="top"
td class="fieldlabel" nowrap="1"Format/td
td class="fieldvalue"Paperback/td
/tr
tr valign="top"
td class="fieldlabel" nowrap="1"Cover Price/td
td class="fieldvalue"$1.99/td
/tr
tr valign="top"
td class="fieldlabel" nowrap="1"No. of Pages/td
td class="fieldvalue"352/td
/tr
tr valign="top"
td class="fieldlabel"
nowrap="1"Height x Width/td
td class="fieldvalue"
font size="+0"192
x
126
mm
/font
/td
/tr
/table
/div


The trouble I find with Word is that I can't seem to mark the beginning
of the text I'm interested in, search for the end, and then delete that
section. I need to do this with keystrokes as I record the steps for
a macro.

Can anyone help?
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use mouse to select text in MS Word macro recorder. hellbent Page Layout 3 October 10th 06 11:54 AM
Select text in macro Bubbles New Users 1 August 18th 06 12:44 PM
When i select text i can't write over it or delete it. Sofie Microsoft Word Help 1 May 24th 06 11:59 AM
Can't select text and delete with backspace or replace with text NisaacK78 Microsoft Word Help 1 March 31st 06 03:07 PM
How do I write a macro to find, select, and then delete a Section. nw_nick Microsoft Word Help 2 August 8th 05 08:41 PM


All times are GMT +1. The time now is 10:17 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"