cutting text issue

V

Vagabound_s

Hi,

I am trying to create a macro which will search for hidden/cutting content
due to inappropriate formatting, I am planning to do it using following tasks:

1) search for negative indentation in the document and list them in a list box
2) seach for data going beyond left or right page margin using tab stops
3) table with rowheight set to wdRowHeightExactly due to which the content
when wraped is not visible


I initially tried using find functionality however, I am unable to get
appropriate results.

I am able to write code for two out of the three tasks, However, it is
turning to be very inefficient due to looping and taking a very long time.
Does anyone have better idea?

For i = 1 To ActiveDocument.Paragraphs().Count
If ActiveDocument.Paragraphs(i).LeftIndent < 0 Then
UserForm1.NegativeList.Visible = True
UserForm1.NegativeList.Enabled = True
UserForm1.NegativeList.AddItem (i)
End If
Next

End Sub

Sub FindRowHeight()
For i = 1 To ActiveDocument.Tables().Count
If ActiveDocument.Tables(i).Rows.HeightRule = wdRowHeightExactly And
ActiveDocument.Tables(i).Rows.Height = InchesToPoints(0) Then
UserForm1.IndentList.Visible = True
UserForm1.IndentList.Enabled = True
UserForm1.IndentList.AddItem (i)
End If
Next
End Sub

Thanks
 

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