|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Attn Sue - Outlook automation not working in windows serviceHi Sue
I have written an application in VB 6.0 to read the mails from outlook and upload the same to SQL DB. There is no issue in this is working fine. But same application if i convert as a windows service it is not working It is not identifying the mails items (Items.Count = 0) (Service i have deployed in Windows XP) Could you pls tell me what will be the problem? Anticipating your reply Baskar Don't ever run Outlook in a Windows service. It's not suited to it. Use CDO
1.21 or some other method of access in a service. -- Show quoteHide quoteKen Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Baskar" <Bas***@discussions.microsoft.com> wrote in message news:D9686986-646D-440D-B36F-E14B7CF9C24B@microsoft.com... > Hi Sue > > I have written an application in VB 6.0 to read the mails from outlook and > upload the same to SQL DB. There is no issue in this is working fine. > But same application if i convert as a windows service it is not working > It is not identifying the mails items (Items.Count = 0) > (Service i have deployed in Windows XP) > > Could you pls tell me what will be the problem? > Anticipating your reply > > Baskar Hi Ken
Thanks for your reply Could pls guide me how do i read mails from outlook 2002 using CDO.dll? I have outlook 2002 in my system, but i couldn't find CDO.dll in my system Expecting you valuable support Baskar C.G Show quoteHide quote "Ken Slovak" wrote: > Don't ever run Outlook in a Windows service. It's not suited to it. Use CDO > 1.21 or some other method of access in a service. > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm > > > "Baskar" <Bas***@discussions.microsoft.com> wrote in message > news:D9686986-646D-440D-B36F-E14B7CF9C24B@microsoft.com... > > Hi Sue > > > > I have written an application in VB 6.0 to read the mails from outlook and > > upload the same to SQL DB. There is no issue in this is working fine. > > But same application if i convert as a windows service it is not working > > It is not identifying the mails items (Items.Count = 0) > > (Service i have deployed in Windows XP) > > > > Could you pls tell me what will be the problem? > > Anticipating your reply > > > > Baskar > > CDO 1.21 is an optional installation for Outlook 2000 and later. You can
install it as Collaboration Data Objects from the Office CD using Add/Remove Programs and expanding the Outlook tree node in the installation wizard. For lots of examples of using CDO 1.21 see www.cdolive.com/cdo5.htm -- Show quoteHide quoteKen Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Baskar" <Bas***@discussions.microsoft.com> wrote in message news:4FCD8236-FD2E-43BE-B2B9-3798D215152F@microsoft.com... > Hi Ken > > Thanks for your reply > Could pls guide me how do i read mails from outlook 2002 using CDO.dll? > I have outlook 2002 in my system, but i couldn't find CDO.dll in my system > > Expecting you valuable support > Baskar C.G Could you pls tell me why i couldn't automate outlook from Windows Service?
Are there any limitations in windows service? Basically requirement is Every 10 min my App./Service should read mails from outlook and it has to be updated in the SQL server DB. I have developed a Standard EXE app which is working fine Will deploying an EXE in the client place is a right way to achieve this? Are there any other ways to achieve this apart from Std EXE & Win Service? Excepting you valuable support to continue my work By Baskar Show quoteHide quote "Ken Slovak" wrote: > CDO 1.21 is an optional installation for Outlook 2000 and later. You can > install it as Collaboration Data Objects from the Office CD using Add/Remove > Programs and expanding the Outlook tree node in the installation wizard. > > For lots of examples of using CDO 1.21 see www.cdolive.com/cdo5.htm > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm > > > "Baskar" <Bas***@discussions.microsoft.com> wrote in message > news:4FCD8236-FD2E-43BE-B2B9-3798D215152F@microsoft.com... > > Hi Ken > > > > Thanks for your reply > > Could pls guide me how do i read mails from outlook 2002 using CDO.dll? > > I have outlook 2002 in my system, but i couldn't find CDO.dll in my system > > > > Expecting you valuable support > > Baskar C.G > > Outlook is not safe for use in a service, it has a UI and throws up modal
dialogs. Services must be able to run unattended. In addition, Outlook is not thread safe. You can use it if you want but it goes against MS's own documentation and all practical experience. See http://support.microsoft.com/?kbid=237913 for 4 major reasons that Outlook object model code is unsuitable for use in a Windows service. For code in a service you generally use CDO 1.21 or Extended MAPI, not Outlook code. -- Show quoteHide quoteKen Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Baskar" <Bas***@discussions.microsoft.com> wrote in message news:E385085A-13E9-434D-A373-B918F855CAFF@microsoft.com... > Could you pls tell me why i couldn't automate outlook from Windows > Service? > Are there any limitations in windows service? > > Basically requirement is > Every 10 min my App./Service should read mails from outlook and it has to > be > updated in the SQL server DB. > I have developed a Standard EXE app which is working fine > > Will deploying an EXE in the client place is a right way to achieve this? > Are there any other ways to achieve this apart from Std EXE & Win Service? > > Excepting you valuable support to continue my work > > By > Baskar Hi Ken,
Your explanations and links were really helpful to us to take the decision is the right time. We have dropped the idea to automate outlook from Win service Thanks a lot for you excellent support Wish you very happy New Year By Baskar C.G Show quoteHide quote "Ken Slovak" wrote: > Outlook is not safe for use in a service, it has a UI and throws up modal > dialogs. Services must be able to run unattended. In addition, Outlook is > not thread safe. You can use it if you want but it goes against MS's own > documentation and all practical experience. See > http://support.microsoft.com/?kbid=237913 for 4 major reasons that Outlook > object model code is unsuitable for use in a Windows service. > > For code in a service you generally use CDO 1.21 or Extended MAPI, not > Outlook code. > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm > > > "Baskar" <Bas***@discussions.microsoft.com> wrote in message > news:E385085A-13E9-434D-A373-B918F855CAFF@microsoft.com... > > Could you pls tell me why i couldn't automate outlook from Windows > > Service? > > Are there any limitations in windows service? > > > > Basically requirement is > > Every 10 min my App./Service should read mails from outlook and it has to > > be > > updated in the SQL server DB. > > I have developed a Standard EXE app which is working fine > > > > Will deploying an EXE in the client place is a right way to achieve this? > > Are there any other ways to achieve this apart from Std EXE & Win Service? > > > > Excepting you valuable support to continue my work > > > > By > > Baskar > > Could you pls tell me why i couldn't automate outlook from Windows Service?
Are there any limitations in windows service? Basically requirement is Every 10 min my App./Service should read mails from outlook and it has to be updated in the SQL server DB. I have developed a Standard EXE app which is working fine Will deploying an EXE in the client place is a right way to achieve this? Are there any other ways to achieve this apart from Std EXE & Win Service? Excepting you valuable support to continue my work By Baskar C.G Show quoteHide quote "Ken Slovak" wrote: > CDO 1.21 is an optional installation for Outlook 2000 and later. You can > install it as Collaboration Data Objects from the Office CD using Add/Remove > Programs and expanding the Outlook tree node in the installation wizard. > > For lots of examples of using CDO 1.21 see www.cdolive.com/cdo5.htm > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm > > > "Baskar" <Bas***@discussions.microsoft.com> wrote in message > news:4FCD8236-FD2E-43BE-B2B9-3798D215152F@microsoft.com... > > Hi Ken > > > > Thanks for your reply > > Could pls guide me how do i read mails from outlook 2002 using CDO.dll? > > I have outlook 2002 in my system, but i couldn't find CDO.dll in my system > > > > Expecting you valuable support > > Baskar C.G > >
Other interesting topics
Read_links_in_Mails?
Sending emails with MAPI Inspector CommandBarButton with Word as Mail Converting Outlook2003 .pst to Outlook2002 Late binding to Outlook via VBA My add-in never gets loaded Return the date and hours currently selected in the calender Disable Voting Options (.VotingOptions) Sticking a picture Can't set Outlook Express as the default mail client |
|||||||||||||||||||||||