[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

Word VBA: How do I check to see if my selection is a carriage return?

Trying to write code to see if my selection is a carriage return or not.  
Anyone have some suggestions?
0
Raphelle
Asked:
Raphelle
1 Solution
 
ragnarok89Commented:
Can you be a little more specific? What do you mean by selection?
0
 
PandaPantsCommented:
Try something like this:

Dim boolSelectionIsCarriageReturn As Boolean
    If Selection.Text = vbCr Then
        boolSelectionIsCarriageReturn = True
    Else
        boolSelectionIsCarriageReturn = False
    End If

Open in new window

0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now