cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

VBScript: Get the content of a text region ?

BurkhardDahl
Newbie

VBScript: Get the content of a text region ?

Hallo MathCad Collab,

is there a usable solution to get the content (value?) of a text region object in a VBScript worksheet.regions - loop like this:

Const mcTextRegion = 0

For each rg in Worksheet.Regions

If rg.Type = mcTextRegion Then

TextRegionString = rg.???????

......

......

End If

Next

Using a Listbox - Component in Mathcad V13 / V14.

Thanks Burkhard

3 REPLIES 3

Re: VBScript: Get the content of a text region ?

Unfortunately, I don't think there is any way to do what you want. At least, not any easy way. I tihnk the only way to do it would be to read the entire XML of the file and parse it to find the desired text.

Re: VBScript: Get the content of a text region ?

That could be done as Richards suggests, but why would you want to?


Can you provide a little more information or maybe a worksheet as there might be alternative routes to go down.


Mike

Re: VBscript: Get the content of a text region ?

I want to assign region.tag = region.text to automate the creation of a table of content (TOC).

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."