[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2010-09-15
2
Medium Priority
?
285 Views
Last Modified: 2012-05-10
Trying to write code to see if my selection is a carriage return or not.  
Anyone have some suggestions?
0
Comment
Question by:Raphelle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Expert Comment

by:ragnarok89
ID: 33686310
Can you be a little more specific? What do you mean by selection?
0
 
LVL 8

Accepted Solution

by:
PandaPants earned 2000 total points
ID: 33686976
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question