|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Outlook.Application is not defined. PIA installed and setup correctly.First timer be gentle. I have this code I am trying to put into a
vb.net addin for ol2003. I get the error Outlook.Application and Outlook.Selection is not declared. I have installed the PIA's and made sure they are pointing to the GAC. Any ideas would be apreciated. Imports Extensibility Imports System.Runtime.InteropServices Imports Microsoft.Office.Core Imports Microsoft.Office.Interop.Outlook Public Sub SendToSpam() Dim objOL As Outlook.Application Dim objSelection As Outlook.Selection Dim objMsg As Object Dim objNewMsg As Object Tony,
Change: > Imports Microsoft.Office.Interop.Outlook To:Imports Outlook = Microsoft.Office.Interop.Outlook You were importing Outlook itself, hence you could have used just Application instead of Outlook.Application... To avoid name conflicts between System.Windows.Forms.Application & Outlook.Application I normally use the above namespace alias. Hope this helps Jay <tony_***@yahoo.com> wrote in message Show quoteHide quote news:1112134045.490613.68350@l41g2000cwc.googlegroups.com... > First timer be gentle. I have this code I am trying to put into a > vb.net addin for ol2003. I get the error Outlook.Application and > Outlook.Selection is not declared. I have installed the PIA's and made > sure they are pointing to the GAC. Any ideas would be apreciated. > > Imports Extensibility > Imports System.Runtime.InteropServices > Imports Microsoft.Office.Core > Imports Microsoft.Office.Interop.Outlook > > Public Sub SendToSpam() > Dim objOL As Outlook.Application > Dim objSelection As Outlook.Selection > Dim objMsg As Object > Dim objNewMsg As Object > That worked! thanks a lot.
However, once I built the add-in. and installed it, I get 'not a valid office add-in' when trying to add it through Outlook. Any ideas? Using VS.net 2003, and using the office add-in wizard. Tony,
Do either of these KB articles help? http://support.microsoft.com/?kbid=235009 http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316723 Hope this helps Jay <tony_***@yahoo.com> wrote in message Show quoteHide quote news:1112219247.307591.214140@g14g2000cwa.googlegroups.com... | That worked! thanks a lot. | | However, once I built the add-in. and installed it, I get 'not a valid | office add-in' when trying to add it through Outlook. Any ideas? | | Using VS.net 2003, and using the office add-in wizard. |
Why have a DBNull?
vb.net windows deployment Datagrid cell change event? Where to find event. Inheritance Question in VB.NET Please: Sign the Petition in order to Save VB6 code... CSV Separator RowFilter and DataColumn Named as Number Assign deployment version number to a variable Databindings Question customised datagrid |
|||||||||||||||||||||||