LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Tab Position

This code works for me. I believe there'e a newsgroup for Word and VBA
programming, so if the following doesn't solve your problem, you can ask
there.

Sub Test()
With ActiveDocument
For p = 1 To .Paragraphs.Count - 1
If Left$(.Paragraphs(p + 1).Range.Text, 1) = vbTab Then
Debug.Print p + 1, "tab"
Else
Debug.Print p + 1, "no tab"
End If
Next p
End With
End Sub

On Thu, 6 Jan 2005 13:23:12 -0800, "Robert"
wrote:

Hi,

I am new to VBA in Word. Would anyone be able to answer
this:

If I have two tabs and I am at the position starting at
the second tab, how can I determine in VBA if there is
anything at the first tab on the next line. For example:

Tab 1 Tab 2
Line 1 Some Text Some other text
Line 2 Yet more text

If there is a paragraph mark at the end of "Some other
text" on Line 1, when I return to the start of the next
line, how can I determine if there is anything at Tab 1
for the second line?

I hope I am explaining this clear enough! Any help would
be appreciated.

Thanks.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
There is no row at position 0 Catbean Excel Discussion (Misc queries) 1 November 21st 08 11:24 PM
Look up a value which position changes. David_in_AUS Excel Discussion (Misc queries) 1 June 13th 06 09:01 AM
How can I fix the position of a row [email protected] Excel Discussion (Misc queries) 3 June 8th 06 10:27 PM
.position chazman Charts and Charting in Excel 4 February 28th 05 02:26 AM
UserForm position Tim Excel Programming 2 February 12th 04 03:20 PM


All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"