{{tag>category:"OpenInsight 32-Bit" author:"Barry Stevens"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== ole word.application (OpenInsight 32-Bit) ==== === At 26 MAY 2010 08:58:20PM Barry Stevens wrote: === I have a word document that is the result of a word merge that is saved. I then need to be able to replace text in the document. The record macro to do this a follows, which I need 'decoded' into OLE commands. (I have a couple of fields to replace so if this makes a difference please show). Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text=NEWSPAPER_INSERTION_DATES" .Replacement.Text=FRIDAY 28th MAY 2010; MONDAY 31st MAY 2010" .Forward=True .Wrap=wdFindContinue .Format=False .MatchCase=False .MatchWholeWord=False .MatchWildcards=False .MatchSoundsLike=False .MatchAllWordForms=False End With Selection.Find.Execute Replace:=wdReplaceAll tia -Barry ---- === At 28 MAY 2010 07:08PM Barry Stevens wrote: === Can anyone please help me on this. ---- === At 30 MAY 2010 12:35AM Barry Stevens wrote: === OK, I have found an example in the ole automation doc - ex kb , I think. is in my kb folder of stuff ---- === At 30 MAY 2010 03:16AM Barry Stevens wrote: === Oh great!!!!, it doesnt work. I will post it again [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=6C94F92A816790BD852577300005575E|View this thread on the Works forum...]]