Posts 1 - 10 of 14
First | Prev. | 1 2 | Next | Last
|
|
User User
Guest
|
Hi,
I have used private void AddinModule_AfterUninstallControls(object sender, AddinExpress.MSO.ADXOfficeHostApp hostApp, object hostAppObj)
to remove the view i have added and properties to the mails:
I have the follow code:
Microsoft.Office.Interop.Outlook.Application oApp= null;
Microsoft.Office.Interop.Outlook._NameSpace oNameSpace;
Microsoft.Office.Interop.Outlook.MAPIFolder oInboxFolder;
oApp = new Microsoft.Office.Interop.Outlook.Application();
oApp = new Microsoft.Office.Interop.Outlook.Application();
oNameSpace = oApp.GetNamespace("MAPI");
MessageBox.Show(oApp.ToString());
MessageBox.Show(oApp.Name);
oNameSpace.Logon(null, null, true, false);
oInboxFolder= oNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
...
When it try to Logon give un Exception:
Exception Source: Microsoft Office Outlook
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Não ? poss?vel concluir a opera?ão. A liga?ão não foi estabelecida.
Exception Target Site: Logon
Can you help me? what better way to do it?
Thanks very much |
|
Posted 16 Dec, 2009 06:26:19
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hi User,
That event provides the following parameters:
- sender - the add-in module
- hostApp - the type of the host application
- hostAppObj - the host application itself
In other words, you don't need to create Outlook because it is already created. You need to use hostAppObj in the event handler instead of new Microsoft.Office.Interop.Outlook.Application().
Andrei Smolin
Add-in Express Team Leader |
|
Posted 16 Dec, 2009 07:01:45
|
|
Top
|
|
User User
Guest
|
thanks.
Now when i do :
Microsoft.Office.Interop.Outlook.Folder oInboxFolder = oApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) as Microsoft.Office.Interop.Outlook.Folder;
i have the same expcetion:
Exception Source: Microsoft Office Outlook
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Não ? poss?vel concluir a opera?ão. A liga?ão não foi estabelecida.
Exception Target Site: GetDefaultFolder |
|
Posted 16 Dec, 2009 08:31:28
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
How do you cast hostAppObj to Microsoft.Office.Interop.Outlook.Application? May I see the code preceding those lines?
Can you please translate the exception message to English? BTW, is it in Spanish?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 16 Dec, 2009 08:47:41
|
|
Top
|
|
User User
Guest
|
Sory, no its in Portuguese.
Exception Message :Unable to complete the operation. The link was not established
private void AddinModule_BeforeUninstallControls(object sender, AddinExpress.MSO.ADXOfficeHostApp hostApp, object hostAppObj)
{
Microsoft.Office.Interop.Outlook.Application oApp = (Microsoft.Office.Interop.Outlook.Application)hostAppObj;
Microsoft.Office.Interop.Outlook.Folder oInboxFolder = oApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) as Microsoft.Office.Interop.Outlook.Folder;
...} |
|
Posted 16 Dec, 2009 08:56:47
|
|
Top
|
|
User User
Guest
|
what is wrong?
Thanks for the help. |
|
Posted 17 Dec, 2009 05:05:47
|
|
Top
|
|
User User
Guest
|
|
Posted 17 Dec, 2009 05:27:51
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hi User,
We are now looking at the issue. It seems, there's a problem in our code. As soon as we have any news on this, I'll let you knwo.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 17 Dec, 2009 06:13:19
|
|
Top
|
|
User User
Guest
|
|
Posted 23 Dec, 2009 06:04:15
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18821
Joined: 2006-05-11
|
Hi User,
I'm sorry, this will be fixed in January, 2010.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 24 Dec, 2009 01:58:41
|
|
Top
|
|
Posts 1 - 10 of 14
First | Prev. | 1 2 | Next | Last
|