G
Gabriel
Greetings,
I am have made an application that opens word documents and removes the
shading patterns from all words. since it will not work on paragraphs i
have to do it per word.
all is working well except when there is a table.
the application start going in each cell word by word and fixes it but
at the end of the row it selects something right outside of the table
(like an extra cell) which throws an exception when i run the code to
remove the shading.
code: (i remove more than just shading)
For Each actualword In Doc.Words
'just for visual help
actualword.Select()
actualword.FormattedText.Font.Color = WdColor.wdColorAutomatic
actualword.HighlightColorIndex = WdColorIndex.wdNoHighlight
actualword.Shading.BackgroundPatternColorIndex =
WdColorIndex.wdNoHighlight
actualword.Shading.ForegroundPatternColorIndex =
WdColorIndex.wdNoHighlight
Next
how can i overcome this ?
thank you
I am have made an application that opens word documents and removes the
shading patterns from all words. since it will not work on paragraphs i
have to do it per word.
all is working well except when there is a table.
the application start going in each cell word by word and fixes it but
at the end of the row it selects something right outside of the table
(like an extra cell) which throws an exception when i run the code to
remove the shading.
code: (i remove more than just shading)
For Each actualword In Doc.Words
'just for visual help
actualword.Select()
actualword.FormattedText.Font.Color = WdColor.wdColorAutomatic
actualword.HighlightColorIndex = WdColorIndex.wdNoHighlight
actualword.Shading.BackgroundPatternColorIndex =
WdColorIndex.wdNoHighlight
actualword.Shading.ForegroundPatternColorIndex =
WdColorIndex.wdNoHighlight
Next
how can i overcome this ?
thank you