K
khairule
Hi,
I am using Word.Application.Document.Sentences to get all sentences in
a word document. By default, the VBA would return sentences delimited
by full stop. How could I change it to look for other delimiters, such
as a comma, or even custom define it?
For example, these are 2 sentences in a paragraph:
{##1##}The brown fox jumps over the lazy dog. {/##1##}{##2##}The brown
fox jumps over the lazy dog. {/##2##}
If I use Word.Application.Document.Sentences in a loop, it would return
me 3 lines:
line 1: {##1##}The brown fox jumps over the lazy dog.
line 2: {/##1##}{##2##}The brown fox jumps over the lazy dog.
line 3: {/##2##}
What I need is to have only these 2 sentences:
line 1:{##1##}The brown fox jumps over the lazy dog. {/##1##}
line 2:{##2##}The brown fox jumps over the lazy dog. {/##2##}
Please help. Thank you in advance.
I am using Word.Application.Document.Sentences to get all sentences in
a word document. By default, the VBA would return sentences delimited
by full stop. How could I change it to look for other delimiters, such
as a comma, or even custom define it?
For example, these are 2 sentences in a paragraph:
{##1##}The brown fox jumps over the lazy dog. {/##1##}{##2##}The brown
fox jumps over the lazy dog. {/##2##}
If I use Word.Application.Document.Sentences in a loop, it would return
me 3 lines:
line 1: {##1##}The brown fox jumps over the lazy dog.
line 2: {/##1##}{##2##}The brown fox jumps over the lazy dog.
line 3: {/##2##}
What I need is to have only these 2 sentences:
line 1:{##1##}The brown fox jumps over the lazy dog. {/##1##}
line 2:{##2##}The brown fox jumps over the lazy dog. {/##2##}
Please help. Thank you in advance.