October 1999
Beginner
410 pages
10h 45m
English
The very nature of Word VBA syntax often leads to long lines of code, which can be difficult to read, especially if we need to scroll horizontally to see the entire line. For this reason, Microsoft recently introduced a line-continuation character into VBA. This character is the underscore (_), which must be preceded by a space and cannot be followed by any other characters (including comments). For example, the following code:
ActiveDocument.Paragraphs(1).Alignment = _ wdAlignParagraphCenter
is treated as one line by Word.
A line-continuation character cannot be inserted in the middle of a literal string constant, which is enclosed in quotation marks.
Read now
Unlock full access