V
Vagabound_s
Hi,
I am storing all custom tabstops in the document which go beyound the page
margin and in a listbox.
Then I want to browse through the paragraphs containing those tabstops at
the click of the list box.
I am able to browse through paragraph containing tabstops withing the page
margin howevr for tabstops beyond page margin entire document gets selectd.
If I run a manual find for tabstop, it works fine not not so in the code.
Can anyone help?
Below is the code:
Private Sub TabList_Click()
With ActiveDocument.Content.Find
.ClearFormatting
.Forward = True
.Format = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.ParagraphFormat.TabStops.Add
Position:=InchesToPoints(UserForm1.TabList.Value)
.Text = ""
.Execute
.Parent.Select
End With
End Sub
I am storing all custom tabstops in the document which go beyound the page
margin and in a listbox.
Then I want to browse through the paragraphs containing those tabstops at
the click of the list box.
I am able to browse through paragraph containing tabstops withing the page
margin howevr for tabstops beyond page margin entire document gets selectd.
If I run a manual find for tabstop, it works fine not not so in the code.
Can anyone help?
Below is the code:
Private Sub TabList_Click()
With ActiveDocument.Content.Find
.ClearFormatting
.Forward = True
.Format = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.ParagraphFormat.TabStops.Add
Position:=InchesToPoints(UserForm1.TabList.Value)
.Text = ""
.Execute
.Parent.Select
End With
End Sub