Re: Parse style names into alias segments?
- From: "Jonathan West" <jwest@xxxxxxxx>
- Date: Tue, 21 Feb 2006 16:19:44 -0000
Hi Bear,
This might do the needful
If Instr(objPara.Style & ",", ",LN,") > 0 Then ...
This works on the basis that somewhere within your new style name with all the
aliases is your original vale. You need to ensure that you aren't matching a
part of another alias of a different style, hence the need to add a
terminating comma to the alias list, and match for the style name with
opening and closing commas added.
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
"Bear" <Bear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:276D8026-373C-4C8F-9EA1-E1F82C136D10@xxxxxxxxxxxxxxxx
I use a lot of this:
if objPara.Style = "LN" then...
But now I'm asked to add aliases to my standard set of styles. This will
break a lot of my code.
My first thought is to build a common function that will parse out each
segment of the style name, then evaluate each segment (Select Case), and
pass
back the appropriate segment.
Does anyone have any code they'd like to share? I've explored Array, but
aliases aren't formatted that way.
Or is there a way to test a style that avoids this problem?
Bear
.
- Prev by Date: Re: Capture ALL movements...event?
- Next by Date: Re: Toolbars-customizing
- Previous by thread: Error on "Kill"?
- Next by thread: Re: Parse style names into alias segments?
- Index(es):