【发布时间】:2015-12-28 19:07:59
【问题描述】:
我想使用 Trim 或 Ltrim 来更改我的选择。我有一个长长的 If-Then 列表。以下是一个简短的例子
With Selection
If .Text = "Since" or .Text = "Since " Then .TypeText Text:= "Because"
If .Text = "since" or .Text = "since " Then .TypeText Text:= "because"
End With
如何在 if-then 语句之前修剪我的选择?另外,对于上面的示例,是否有更简单的方法来进行适当的区分大小写的更改?
【问题讨论】:
-
应该是UCase(Trim(.Text)) = "SINCE"