M
major
I was curious whether there was regular expressions in vba similar to perl.
This is what I want to do.
I have a documents of 150 pages long. I am trying to programmatically format
it. I am looping through paragraphs to apply heading styles. All headings
begin with section numbers. For ex:
2.4 Overview
---body text
2.4.1 Intro
---body text
2.4.1.2 etc
Now I want to apply heading styles based on numbers. So if paragraph begins
with #.(1 number) apply heading 1, if #.(2 numbers) apply heading 2. The
question is how to pattern search for paragraph begins with number followed
by 1(or 2 #'s etc)? This isn't probably the best method to this either, if
someone had an alternative logic it would be helpful.
Many thanks in advance.
This is what I want to do.
I have a documents of 150 pages long. I am trying to programmatically format
it. I am looping through paragraphs to apply heading styles. All headings
begin with section numbers. For ex:
2.4 Overview
---body text
2.4.1 Intro
---body text
2.4.1.2 etc
Now I want to apply heading styles based on numbers. So if paragraph begins
with #.(1 number) apply heading 1, if #.(2 numbers) apply heading 2. The
question is how to pattern search for paragraph begins with number followed
by 1(or 2 #'s etc)? This isn't probably the best method to this either, if
someone had an alternative logic it would be helpful.
Many thanks in advance.