From: Roy Roy on 20 Jan 2010 14:54 I am manually checking hundreds of documents to insure that: 1) every image or embedded object has alt-text 2) every table has a caption 3) every table has a header row that repeats on a page break and that cells do not break across pages is there a tool that could be a starting point for building something to autmate this
From: data.file on 20 Jan 2010 20:13 "Roy" <Roy @discussions.microsoft.com> wrote in message news:29C3C3DE-2ED8-4AAD-AE80-1721C1F680D9(a)microsoft.com... >I am manually checking hundreds of documents to insure that: > 1) every image or embedded object has alt-text > 2) every table has a caption > 3) every table has a header row that repeats on a page break and that > cells > do not break across pages > > is there a tool that could be a starting point for building something to > autmate this You'll have to write a macro. I do not quite understand what you mean by alt-text in item 1) and I've never used table captions. As for item 3), below is my old macro. It does a few other things apart from what you require. Instead of removing the code I commented it. If you do not need anything else from the macro, just delete all the lines that start with '. Note that you cannot simply uncomment everything. The full macro requires that certain table and paragraph styles are present as well as another macro. Public Sub TCleaner() Dim oTable As Table 'Dim oCell As Cell 'Dim Counter As Long ' ' ' 'CopyTableStyles ' For Each oTable In ActiveDocument.Tables ' ' oTable.Style = "NiceTable" ' ' oTable.Select ' With Selection ' .Style = "NiceTableTextC" ' .Rows.HeadingFormat = False ' End With ' With oTable ' .Rows.Alignment = wdAlignRowLeft ' .Rows.WrapAroundText = False .Rows.AllowBreakAcrossPages = False ' .AllowPageBreaks = False ' .AllowAutoFit = False ' .Rows.HeightRule = wdRowHeightAuto ' .Rows.Height = CentimetersToPoints(0) .Rows.HeadingFormat = False ' .PreferredWidthType = wdPreferredWidthPercent ' .PreferredWidth = 100 End With ' oTable.Cell(1, 1).Select Selection.EndKey Unit:=wdRow, Extend:=wdExtend Selection.Rows.HeadingFormat = True ' ' oTable.Select ' ' Set oCell = oTable.Range.Cells(1) ' For Counter = 1 To oTable.Range.Cells.Count ' If oCell.ColumnIndex = 1 Then ' oCell.Range.Style = "NiceTableText" ' End If ' Set oCell = oCell.Next ' Next Counter ' ' For Each oCell In Selection.Range.Cells ' oCell.Select ' If Selection.Rows.HeadingFormat = True Then ' With Selection ' .Style = "NiceTableHeader" ' .Shading.BackgroundPatternColor = wdColorGray10 ' End With ' End If ' ' Next oCell ' ActiveDocument.UndoClear ' Next oTable ' ' ' End Sub Regards, Sergey
From: Doug Robbins - Word MVP on 20 Jan 2010 21:50 For all but the captions, you could probably do what you want with a macro containing the following code, though you would have to re-run it after correcting any deficiencies that it detected, which it would do by selecting the non-conforming item With ActiveDocument For i = 1 To .InlineShapes.Count With .InlineShapes(i) If .AlternativeText = "" Then .InlineShapes(i).Select Exit Sub End If End With Next i For i = 1 To .Tables.Count With .Tables(i).Rows(1) If .HeadingFormat <> True Then .Select Exit Sub End If End With With .Tables(i) For j = 1 To .Rows.Count With .Rows(i) If .AllowBreakAcrossPages = True Then .Select Exit Sub End If End With Next j End With Next i End With For the captions however, as they are not really "linked" to the tables, about all that you could do is compare a .Count of the tables in the document with a count of the number of { SEQ Table } fields in the document. -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "Roy" <Roy @discussions.microsoft.com> wrote in message news:29C3C3DE-2ED8-4AAD-AE80-1721C1F680D9(a)microsoft.com... >I am manually checking hundreds of documents to insure that: > 1) every image or embedded object has alt-text > 2) every table has a caption > 3) every table has a header row that repeats on a page break and that > cells > do not break across pages > > is there a tool that could be a starting point for building something to > autmate this
|
Pages: 1 Prev: Invalid Argument every other run- Added infor Next: Refreshing fields in table cells. |