ComponentOne VSView 8.0
FindTag Property

Finds a tag in the current document, returns the page and bounding rectangle (in X1,Y1,X2,Y2) for the match.

Syntax

iPage = [form!]VSPrinter.FindTag(Text As String, [ CaseSensitive As Variant ], [ StartPage As Variant ], [ EndPage As Variant ], [ StartY As Variant ])

Remarks

Tags are pieces of hidden text in a document. They are created with the StartTag and EndTag methods, and may be used for a number of things, including document annotation, pop-up notes, hyperlinks, and more. The FindTag property allows you to search for tags based on their contents. To search for tags based on their position in the document, use the RetrieveTag property instead. For details and examples about creating and using tags, see the Build a Table of Contents sample.

The parameters for the FindTag property are described below:

Text As String

Contains the text of the tag to be found. The control performs partial matches, so setting Text to "FIELD:" will retrieve tags with text "FIELD:first" and "FIELD:last".

CaseSensitive As Variant  (optional)

Specifies whether the control should perform a case-sensitive comparison when looking for matches. The default value for this parameter is False.

StartPage As Variant  (optional)

Specifies the page when the control should start looking for the tag. The default value for this parameter is 1 (the first page).

EndPage As Variant  (optional)

Specifies the page when the control should stop looking for the tag. The default value for this parameter is the value of the PageCount property (the last page).

StartY As Variant  (optional)

Specifies the position on the first page where the search should start. The default value for this parameter is 0 (the top of the page).

You may enumerate tags with identical contents by setting the StartPage and StartY parameters. See the FindText property for an example.

The property returns the number of the page where the tag was found, or -1 if it was not found. The rectangle enclosing the tag is returned in the X1, Y1, X2, and Y2 properties.

Data Type

Long

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback