Document.ParseLine method (Visio)
Parses a line of Microsoft Visual Basic code.
Syntax
expression.ParseLine (Line)
expression A variable that represents a Document object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Line | Required | String | A string interpreted as Visual Basic code. |
Return value
Nothing
Remarks
The ParseLine method tells the Microsoft Visual Basic for Applications (VBA) project of the Document object to parse the string passed to it as an argument.
The ParseLine method raises an exception if the string fails to parse.
Example
Use the following procedure to determine whether a string has been successfully parsed. If the parse succeeds, the procedure displays a message box that announces the success; if the parse fails, it displays a message box that announces the failure.
Public Sub ParseLine_Example()
Call LineParser("String to parse.")
End Sub
Public Sub LineParser(strString As String)
On Error Resume Next
ThisDocument.ParseLine strString
If Err = 0 Then
MsgBox "String parsed successfully"
Else
MsgBox "Parse not successful"
End If
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기