View Single Post
  #2  
Old March 14th 08, 12:58 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,426
Default CreateObject("Outlook.Application") failing to get outtlook

Please don't multipost.

In Outlook 2007, not earlier versions, you can use the
Folder.BeforeItemMove() event and pass back Cancel = True to prevent moving
or deleting items from a folder.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Chris Miller" wrote in message
...
Hi,

I'm having trouble with this call not returning a valid object

I reference a previous post (that I cant find here again)
http://www.devnewsgroups.net/group/m...opic10531.aspx

I believe the cause of this to be setting the default email client in
Internet explorer to something other than outlook.

Is there a (known) way to handle this?

The best I can come up with is checking
[HKEY_CURRENT_USER\SOFTWARE\CLASSES\mailto] in the registry, which gives a
path. This value is set by IE, and checking this value against the
registry
keys below


Fisrtly
[HKEY_CLASSES_ROOT\Outlook.Application\CurVer]
Then getting the appropriate version i.e. (Outlook.Application.11) - 11

then
[HKEY_LM\Software\Microsoft\Office\11.0\Outlook\Ins tallRoot]
where 11.0 has been worked out from the previous step

at this point i have two paths that can be compared.

Is there a more elegant solution to this ?


Thanks in advance



Ads
 

Online Loans - Problem Mortgage - Problem Mortgage - Buy Anything On eBay - Loans