how do i automatically delete many captions

A

Al Smyth

I have many documents with lots of unwanted captions within each document. Is
there a method where I can automatically remove ALL captions rather than
manually delete each one. Thanks for any assistance.
Al S
 
C

Crios

If the captions use the "caption" style you could use either:
Find: any character (^?), Format: Style: Caption, Check "Highlight all
items..." then Delete
Find and replace: same Find as above , Replace with nothing

Hope this helps
 
A

Al Smyth

Thanks Crios,
I will not be able to test until later today but I was unaware of "find any
character". Hopefully this will work. I have about 100 documents each with up
to 150 captions I need to remove and was not looking forward to manual
deletion.
Thanks again
Al S
 
A

Al Smyth

G'Day Crios,
I have been able to test out your method which does work with "caption
formatting". Unfortunately I have discovered the documents I am editing are
NOT using caption formating but the Field "seq" to number items. Although I
am able to search using ^d to find the fields and individually delete the
required fields, I have yet to discover how to specifically target the seq
field so as not to delete the other fields contained in the document. Guess
it back to the reading room. Thank you for your assistance and if you can
think of how to target and delete a specific field it would be appreciated.
Al S
 
C

Crios

Hi

you could use the lack of caption formatting to your advantage:
1 change to view field codes (Alt+F9)
2 replace "SEQ" with Special "find what text" (^&), Format: Style:
Caption (or any other style that you don't use in the documents)
3 replace Special "Any character", Format: Style: Caption with nothing

Hope this works.
 
A

Al Smyth

Hi Crios,
Thank you for all your help. Your suggested method did have a side-effect by
making the entire line the field was in caption style. I may try this method
again on a newer version of office and see if it works correctly there (I
have 2000, 2003 and 2007 and currently was working on 2000). However using
your suggestion I was able to change the formatting font's colour to white,
thus rendering the captions invisible. I will now contruct a macro and add to
normal.dot. This will certainly make my task much easier.
Thanks again
Al S
 
G

Graham Mayor

If the aim of the game is to remove SEQ fields, the following macro will do
that

Dim sLabel As String
sLablel = "Label"
With ActiveDocument
For i = .Fields.Count To 1 Step -1
If .Fields(i).Type = wdFieldSequence Then
' If InStr(1, .Fields(i), sLabel) Then
.Fields(i).Delete
'End If
End If
Next i
End With

It is possible to have several numbering sequences in a document. If you
only want to remove the SEQ fields for a particular sequence, then remove
the initial quotes from the quoted lines and set the sequence name in the
variable sLabel
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

Al Smyth

Hi Graham,
Thanks for this alternative which is more elegant to what I finally used.
This will be added to my knowledge base for future reference.
Al S
 
G

Graham Mayor

I hope you removed the typo ;)
sLablel = "Label" should have read
sLabel = "Label"

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top