這是選擇特定字符數的最簡單方法
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
我在合并隨機函式時遇到問題。
提前感謝您的幫助。
uj5u.com熱心網友回復:
試試這個方法,請:
Sub extendSelRndCharacters()
Dim iMin As Long, iMax As Long, nrCount As Long
iMax = 5: iMin = 1 'limits for number of characters to be operated
Randomize
nrCount = Int((iMax - iMin 1) * Rnd iMin)
Selection.MoveRight Unit:=wdCharacter, Count:=nrCount, Extend:=wdExtend
End Sub
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/325986.html
標籤:vba
上一篇:無法識別VBA格式編號
