Using $find() in Outlook

Kelly Burgess kellyb at montana.com
Sat Mar 2 22:04:39 EST 2013


Hi Todd,

>Does anyone have an idea of what I am doing wrong

Not exactly, never tried it, but if you look at the Word method in the automate.lbs sample library's AutomationCode code class, it has this:

-----------
  Do lSelectionObj.$find() Returns lFindObj     ;; a selection object will change the text when used with a find object
  Do lFindObj.$execute('x.x',kTrue,kTrue,kFalse,kFalse,kFalse,kTrue,kTrue,kFalse,lOMNISVersion,2)     ;; find and replace version number, 2 means find and replace all occurrences

  ;  reset the formatting on 'Dear' to non-italic, so it contrasts with the following name
  Do lFindObj.$text.$assign('Dear')
  Do lFindObj.$execute()
  Do lSelectionObj.$font().$italic.$assign(kFalse)
-----------

That makes it look like the convention is that $find returns a 'find object', which you can configure and $execute.

Maybe Outlook follows this convention.  Your snippet doesn't have any $execute() call.

Kelly



More information about the omnisdev-en mailing list