每个条件迭代

时间:2016-11-21 22:05:51

标签: vba ms-word

嗨我每个循环都有一个

For each bkmark in bookmarks
       If conditional statement is true
           Insert conditional value
            Next for
        End if
       Insert default value
Next``

如何做下一个?

1 个答案:

答案 0 :(得分:1)

你不需要" next"在这里 - 只需在Else块中添加If

For each bkmark in bookmarks
   If conditional statement is true
       Insert conditional value
   Else
       Insert default value
   End if
Next