Message 1 of 4
Extracting info from TitleBlock

Not applicable
03-08-2004
07:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am extracting information from my TitleBlock (see code below), but I have
some concerns...
All information in the TitleBlock is being stored in a collection of
TextBoxes, from 1 to TextBoxes.Count.
I can extract the information, e.a. "MsgBox
oTB.GetResultText(oTB.Definition.Sketch.TextBoxes(26))" is my Project Name.
But what happens if one day the TitleBlock is being edited and someone
deletes a TextBox that has become obsolete?
That kinda messes with my program :-(
Can I prevent that?
*****
Sub ExtractInfoFromTitleBlock()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oTB As TitleBlock
Set oTB = oDoc.ActiveSheet.TitleBlock
Dim i As Integer
For i = 1 To oTB.Definition.Sketch.TextBoxes.Count
MsgBox i & " = " &
oTB.GetResultText(oTB.Definition.Sketch.TextBoxes(i))
Next i
End Sub