如何将CRLF插入ms字DOCVARIABLE或DOCPROPERTY

是否有任何方法创建(并显示)多行DOCVARIABLE没有 VBA? 也就是说“一\ r \ nTwo \ r \ nThree” 渲染成 One Two Three 如何将CRLF插入ms字DOCVARIABLE或DOCPROPERTY

回答:

请尝试以下方法:

{ DOCVARIABLE TestVar \* MERGEFORMAT } 

Sub DocVars()

Dim arr As Variant, joinSting As String

arr = Array("One", "Two", "Three", "Four", "Five")

joinSting = Join(arr, vbNewLine)

ActiveDocument.Variables("TestVar").Value = joinSting

End Sub

以上是 如何将CRLF插入ms字DOCVARIABLE或DOCPROPERTY 的全部内容, 来源链接: utcz.com/qa/259070.html

回到顶部