Using $find() in Outlook
mimm at montana.com
Sun Mar 3 02:20:09 EST 2013
Thanks for the reply Kelly,
I have used the examples in the Automation.lbs as the core for several other operations the app performs with Word, Outlook and Excel, but what I am trying to do is to replace older contacts in Outlook with newer ones from the Studio app. It's working well with the Mac Address Book (Apple Script), but of course I need it to work with Windows.
I found a post here on the list: http://www.omnis-dev.com/cgi-bin/nextmessage.omns?Key=20070213142100)
that is discussing how they successfully did it, and I modeled my code from that. It works fine right to the Do obj.$find(), so either I'm missing something, or the post is. I don't see an $execute() command in their code, but I'm happy to try it. :-) Do you have any idea what the list of parameters is?
On Mar 2, 2013, at 8:04 PM, Kelly Burgess wrote:
> 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.
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en