#1
|
|||
|
|||
Find Tables & Figures Missing Captions
Hi,
Sorry I have one more request. as I told earlier, I receive thousands of pages of Tables and Figures. Each page has Table title or Figure Title on top. However on some pages, this table title or Figure title is missing. Can some one please help me and create macro which will list the pages where this title is missing. These Titles have 'Arial' font and '11' Font size. Table or Figure content has either '10' or '9' font size (If this helps to differentiate title from rest of page). Thanks in advance for your help! |
#2
|
||||
|
||||
Have you used a Style (e.g. Word's Caption Style) for the Table/Figure titles? Do any of your Tables/Figures span more than one page? If so, what do you expect to happen with the second & subsequent pages the same Table/Figure appears on? Are the Figures just text, or are they something else?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks for the reply.
Yes. First page of Table or Figure title has caption style and if Table\Figure spans more than 1 page, it has normal style on second and subsequent pages. Only thing I think separating the Title from rest of page is font. 'Arial' font and '11' Font size. Figures are embedded image files. However Figure Titles are texts. |
#4
|
||||
|
||||
So how does one tell that the Table or Figure spans more than one page and that subsequent pages are NOT different Tables or Figures?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
All the Tables and Figures have Unique Table\Figure number in Title. So if Table spans more than 1 page, all the pages will have table title containing Unique Table number. Also all the tables will have page numbers like 'page 1 of 10'.
e.g. If Table 1.1 is of 3 pages, all 3 pages will have 'Table 1.1' in Table title. |
#6
|
||||
|
||||
Previously (https://www.msofficeforums.com/word-...html#post91935), you said "Tables and Figures are separated by Section Breaks". So, if each Table or Figure is preceded by a Section Break, all one should need to do is look for Section Breaks that aren't followed by a Titles in 11pt Arial?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Yes. you are right. All the tables and figures are separated by Section Break.
However if Tables and Figures span more than 1 page, then each internal page is will have page break at the end. e.g. If Table X is of 3 page, page 1 and 2 will have page break at the end. As table is going to end on page 3 and new table will start on page 4, Page 3 will have section break at end. I hope it clarifies. Sorry for bad English. |
#8
|
||||
|
||||
Try:
Code:
Sub Demo() Dim i As Long, j As Long, strOut As String With ActiveDocument For i = 1 To .Sections.Count With .Sections(i).Range.Characters.First If (.Font.Name = "Arial") And (.Font.Size = 11) Then Else strOut = strOut & vbCr & "Section " & i & " on page " & .Information(wdActiveEndAdjustedPageNumber) End If End With Next End With If strOut = "" Then strOut = "No Missing Captions" Else strOut = "Captions Missing From:" & strOut End If MsgBox strOut End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
Sorry, It didn't work:(
Thanks for the effort! However provided code didn't work.
I tried it on small File. It had 10 page table and on page 4 Title was missing, but it said No missing Caption. |
#10
|
||||
|
||||
It works for me. Your result indicates that, regardless of whether you had a title, whatever was in the first paragraph on the page in question was in 11pt Arial.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modifying captions in Table of Figures | CoffeeNut | Word | 5 | 03-30-2013 01:40 PM |
Captions not appearing underneath figures | bradyj | Word | 1 | 01-18-2013 01:17 PM |
Word 2011 - Figures/Captions help | kenno69 | Word | 0 | 03-31-2012 06:23 AM |
creating tables for row of figures and captions | gib65 | Word | 2 | 08-12-2011 01:25 PM |
Captions (tables and figures) | mcjohn | Word | 1 | 02-11-2010 10:36 PM |