About five or 6 years ago I made a program which worked with OLE integration to Word. The program is still used. And I don't want to spend time recoding the program to the New Way Of Officeintegration! The way the program was made as follows
CREATE OBJECT gs_word 'WORD.APPLICATION'. SET PROPERTY OF gs_word 'VISIBLE' = '1'. CALL METHOD OF gs_word 'Documents' = gs_documents. CALL METHOD OF gs_documents 'Add' = gs_document. CALL METHOD OF gs_document 'Activate'. ** Gets the cursor position GET PROPERTY OF gs_word 'SELECTION' = gs_selection. * ..... much more coding!
I have had no problems by calling methods and getting properties of Word.
But now I have to use the Change command.
In a Word MACRO it looks like:
.Text = "Change from"
.Replacement.Text = "Change to"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
How do I write the "With Selection.Find" command in my ABAP code?