Visio Guy

Visio Discussions => Programming & Code => Topic started by: ch333 on October 04, 2011, 06:51:46 PM

Title: Find and Replace Subscripts Size at the End of a Word
Post by: ch333 on October 04, 2011, 06:51:46 PM
Is there a way to to a universal find/replace of subscript size.  I'm thinking some VBA code.

This is what I want to do, find "WordA" where the word is font size 12 pt and the subscript is font size 12 pt, and change only the subscript to font size 16 pt.  (i.e. "WordA")

I'm thinking the easiest way is do a find subscript command and replace all subscripts with font size 16 pt.

Can anyone point me in the right direction with code; it's been a few years since I've messed with VBA.

Thanks,
Chris
Title: Re: Find and Replace Subscripts Size at the End of a Word
Post by: Jumpy on October 04, 2011, 08:07:08 PM
Not that easy in VBA as you can't just analyse the shape.text. You'll have to use the "Characters" Object, I guess.
Title: Re: Find and Replace Subscripts Size at the End of a Word
Post by: wapperdude on October 05, 2011, 02:33:20 PM
You might want to check out this link, it deals with "characters" .. http://blogs.msdn.com/b/visio/archive/2006/08/18/704811.aspx

Wapperdude
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 46 (show)
Files included: 25 - 925KB. (show)
Memory used: 770KB.
Tokens: post-login.
Cache hits: 6: 0.00103s for 22,292 bytes (show)
Cache misses: 1: (show)
Queries used: 8.

[Show Queries]