![]() |
Outlook 11.0 Library
I have an Excel VBA program that is distributed throughout our company
nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
I think in this case you are stuck with using late binding.
Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
I should have added that you should use only those objects,
methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Chip,
thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Hi Bret
See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem would be Dim OutApp As Object Dim OutMail As Object In general, where ever you have a variable Dim'd as As Outlook.whatever, change it to As Object. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Ron,
Is it possible to check if Outlook is actually installed (via VBA) without running into the Reference error? -- Trefor "Ron de Bruin" wrote: Hi Bret See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
If you are using Late Binding:
On Error Resume Next Set OutlookApp=CreateObject("Outlook.Application") If OutlookApp Is Nothing Then 'Can't create Outlook. Not installed or other error Exit Sub End If NickHK "Trefor" wrote in message ... Ron, Is it possible to check if Outlook is actually installed (via VBA) without running into the Reference error? -- Trefor "Ron de Bruin" wrote: Hi Bret See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
See also
http://www.erlandsendata.no/english/...leavailableapp -- Regards Ron de Bruin http://www.rondebruin.nl "NickHK" wrote in message ... If you are using Late Binding: On Error Resume Next Set OutlookApp=CreateObject("Outlook.Application") If OutlookApp Is Nothing Then 'Can't create Outlook. Not installed or other error Exit Sub End If NickHK "Trefor" wrote in message ... Ron, Is it possible to check if Outlook is actually installed (via VBA) without running into the Reference error? -- Trefor "Ron de Bruin" wrote: Hi Bret See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Nick, Great many thanks
-- Trefor "NickHK" wrote: If you are using Late Binding: On Error Resume Next Set OutlookApp=CreateObject("Outlook.Application") If OutlookApp Is Nothing Then 'Can't create Outlook. Not installed or other error Exit Sub End If NickHK "Trefor" wrote in message ... Ron, Is it possible to check if Outlook is actually installed (via VBA) without running into the Reference error? -- Trefor "Ron de Bruin" wrote: Hi Bret See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
Outlook 11.0 Library
Ron, perfect thanks.
-- Trefor "Ron de Bruin" wrote: See also http://www.erlandsendata.no/english/...leavailableapp -- Regards Ron de Bruin http://www.rondebruin.nl "NickHK" wrote in message ... If you are using Late Binding: On Error Resume Next Set OutlookApp=CreateObject("Outlook.Application") If OutlookApp Is Nothing Then 'Can't create Outlook. Not installed or other error Exit Sub End If NickHK "Trefor" wrote in message ... Ron, Is it possible to check if Outlook is actually installed (via VBA) without running into the Reference error? -- Trefor "Ron de Bruin" wrote: Hi Bret See the example for late binding on my site On every Outlook page you can find it For example on this page (bottom) http://www.rondebruin.nl/mail/folder3/smallmessage.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bret" wrote in message ... Chip, thank you thank you for your expertise, Please, what would be used in place of the Outlook.Mailitem & Create.Item as shown below? Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) thank you again for your help... "Chip Pearson" wrote: I should have added that you should use only those objects, methods, and properties that are present in the earliest version of Outlook that you need to support. In other words, don't use any new in Outlook 11. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... I think in this case you are stuck with using late binding. Change all your Outlook type variables to simple Objects, e.g., change Dim AddrEntry As Outlook.AddressEntry to Dim AddrEntry As Object and create the Outlook Application using CreateObject or GetObject. Dim OL As Object On Error Resume Next Set OL = GetObject(, "Outlook.Application") If OL Is Nothing Then Set OL = CreateObject("Outlook.Application") End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Bret" wrote in message ... I have an Excel VBA program that is distributed throughout our company nationally (1000 users). One of the features is ability for user to click a button and it opens up Outlook with Send to, Subject and a message all filled in and user can of course just click the SEND button. It works for majority of users who have Outlook 2003 however a large portion of users have older Outlook versions that creates a compile error or missing Reference errors, again program uses Outlook 11.0 library. What can be done in code or with references so this feature works with all users who either have Outlook 2003 or the version before this? thanks |
All times are GMT +1. The time now is 09:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com