[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • 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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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