?
Solved

VBA Word 2003:  Vertical Cursor Position as a Variable

Posted on 2007-04-04
2
Medium Priority
?
1,210 Views
Last Modified: 2008-01-09
I'm trying to format a paragraph based on vertical cursor position.  If it's at this position then do this... if it's at that position, do that, etc.

I was able to use the Selection.Information(wdVerticalPositionRelativeToTextBoundary) to determine the cursor position.  Is there anyway to retrieve this information and set it as a variable?  

Thanks for your help!  JTG
0
Comment
Question by:jtaylerg
[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 59

Accepted Solution

by:
Chris Bottomley earned 2000 total points
ID: 18851064
Not sure I understand the problem, but I note with interest the 'command' as a numpty it's not one i've come across.  It can be set to a variable easily as I guess you know so I am obviously missing something.

Sub ee_22491486()
Dim vert_int As Integer
Dim vert_single As Single
    vert_int = CInt(Selection.Information(wdVerticalPositionRelativeToTextBoundary))
    vert_single = Selection.Information(wdVerticalPositionRelativeToTextBoundary)
End Sub
0
 

Author Comment

by:jtaylerg
ID: 18855253
Thanks Chris!

I wasn't using the vert_single...

Thank you -- thank you!

~JTG
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

762 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