I have and document template that contains both text and textboxex (Office XP).
I've made an application that replace the text using the Selection.Find.Execute ... but i noticed that it cannot change the text from textboxes.
Not shure if i'm doing something wrong but i've made also an repalce for the textboxex also.
Checked tf the Shape.Type=1(textboxex with text inside) and then changed the text from Shape.TextFrame.TextRange.Text but the problem i have is that it loses the formatting.
Tryed even to save and restore the textFrame format but nothing, it still lose it.
I wonder if i could use the Selection.Find.Execute method for replacing all the text even those in textboxes.
I was thinking to make use of AutoCorrect object as well but not shure if it's posible. It's hard to make the necesarely tests due to the Winword, Delphy crashes (needs full restart).
Any sugestion apreciated.
________
George, M
I've made an application that replace the text using the Selection.Find.Execute ... but i noticed that it cannot change the text from textboxes.
Not shure if i'm doing something wrong but i've made also an repalce for the textboxex also.
Checked tf the Shape.Type=1(textboxex with text inside) and then changed the text from Shape.TextFrame.TextRange.Text but the problem i have is that it loses the formatting.
Tryed even to save and restore the textFrame format but nothing, it still lose it.
I wonder if i could use the Selection.Find.Execute method for replacing all the text even those in textboxes.
I was thinking to make use of AutoCorrect object as well but not shure if it's posible. It's hard to make the necesarely tests due to the Winword, Delphy crashes (needs full restart).
Any sugestion apreciated.
________
George, M