Solved

VBA Word 2003:  Vertical Cursor Position as a Variable

Posted on 2007-04-04
2
1,194 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
2 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
Comment Utility
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
Comment Utility
Thanks Chris!

I wasn't using the vert_single...

Thank you -- thank you!

~JTG
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now