On 08/23/2012 12:37 PM, Sytze de Boer wrote:
> I'm having some difficulties with the following, and would appreciate some
> help
>
> I am forced to use Outlook with a client (Instead of Blat or Gmail)
>
> So, my prg says
> oOutlook = GetObject(,"Outlook.Application")
> But if Outlook is not open, this throws an error
>
> If i use
> TRY
> oOutlook = GetObject(,"Outlook.Application")
> CATCH
> oOutlook = CreateObject("Outlook.Application")
> ENDTRY
> it throws an error on
> oMailItem.Send()
>
> What am I doing wrong ?
>
>
I just happen to be working on the same thing. There are numerous
documents regarding automating Outlook. You can Google for it.
loapp = CREATEOBJECT("outlook.application")
lospace = loapp.getnamespace("MAPI")
* inbox
loinbox = lospace.getdefaultfolder(6)
loitems = loinbox.items
This is reading emails, but it does work for me. Silly question, but is
Outlook installed on this computer?
HTH
Jeff
---------------
Jeff Johnson
[email protected]
(623) 582-0323
www.san-dc.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.