Y
Yechiel
I am trying to have a macro loop through the cells in a table (Word 2003),
and based on the shading color of the cells, either convert the text in the
cell to a nested table, or do nothing and go to the next cell.
Code:
dim <cellname> as cell
if <cellname>.shading.backgroundpatterncolor = wdColorGray05 or
wdColorGray15 then
<one set of actions, independently determined to work>
else
<other set of actions, independently determined to work>
end if
When I run the macro step-by-step, it always forks the same way regardless
of whether the condition was fulfilled or not. (I also tried AND instead of
OR, with the same result.)
All the rest of the code works fine - when I took out the if statement
above, it ran perfectly.
Any advice?
and based on the shading color of the cells, either convert the text in the
cell to a nested table, or do nothing and go to the next cell.
Code:
dim <cellname> as cell
if <cellname>.shading.backgroundpatterncolor = wdColorGray05 or
wdColorGray15 then
<one set of actions, independently determined to work>
else
<other set of actions, independently determined to work>
end if
When I run the macro step-by-step, it always forks the same way regardless
of whether the condition was fulfilled or not. (I also tried AND instead of
OR, with the same result.)
All the rest of the code works fine - when I took out the if statement
above, it ran perfectly.
Any advice?