Quote:
Originally Posted by SMehta
Sir if i may ask what does the following mean
in Demo 1
Code:
.Text = "[^13]{2,}"
.Replacement.Text = "^p"
in Demo 2
Code:
.Text = "[^13]{2}[!^13]*[^13]{2}"
.Replacement.Text = "^p"
|
Those are standard Word wildcard Find/Replace expressions. See:
Finding and replacing characters using wildcards
Quote:
Originally Posted by SMehta
To check i inserted the both Demos in Module and ran the macro for Demo 1
i got following the error "438" Object doesnt suport this property at
DocTgt.Range.Characters.Last.Text = .Text
|
My bad. I omitted .Range from that line. Code fixed.
Quote:
Originally Posted by SMehta
Something happened surprisingly when
I ran Demo 2
Everything disappeared from VBA programming enviornment Coding Editor
it just displayed Microsoft Visual Basic for Application - Sample
and main document White Page from word was also not seen
|
In both sets of code, the source document isn't visible while being processed. Everything should return to normal once the macro has finished executing.