L
Louverril
This code below was the solution to an earlier problem of mine but I have
found that I cannot ruin and for each .. next code.
Not matter what the detail of the objCC property in the code below - could
be placeholdertext or anything using a "For Each objCC In
ActiveDocument.ContentControls" and running is from the macro run button
hangs Word. The first control is updated and then it sticks and I have to use
task manager to shut word down.
I CAN run it by setting a breakpoint in the vb editor and stepping through
but running it without the breakpoint does not work.
Sub SetInitialShading()
Dim objCC As ContentControl
For Each objCC In ActiveDocument.ContentControls
objCC.Range.Shading.BackgroundPatternColor = wdColorLightYellow
Next
End Sub
Any ideas
Thanks Lou
found that I cannot ruin and for each .. next code.
Not matter what the detail of the objCC property in the code below - could
be placeholdertext or anything using a "For Each objCC In
ActiveDocument.ContentControls" and running is from the macro run button
hangs Word. The first control is updated and then it sticks and I have to use
task manager to shut word down.
I CAN run it by setting a breakpoint in the vb editor and stepping through
but running it without the breakpoint does not work.
Sub SetInitialShading()
Dim objCC As ContentControl
For Each objCC In ActiveDocument.ContentControls
objCC.Range.Shading.BackgroundPatternColor = wdColorLightYellow
Next
End Sub
Any ideas
Thanks Lou