![]() |
Tab Position
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. |
Tab Position
Sorry, Please disregard. I posted to the wrong group.
Sorry to all. -----Original Message----- 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. . |
Tab Position
Try microsoft.public.word.vba.general
-- HTH ------- Bob Phillips "Robert" wrote in message ... 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. |
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. |
All times are GMT +1. The time now is 09:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com