Hi,
I am developping an application in C# that creates outlook contacts from
a database. For the outlook part of the application, I use the outlook
COM object (Version 11 from Office 2003). If a contact is already
present in the outlook contact
database, it should be updated. Therefore I store the outlook EntryID
when adding a contact in outlook in the corresponding database record.
When adding a contact to outlook, I first check if I can get the contact
from outlook by it's EntryID (to update it instead of adding) using
Namespace.GetIt emFromID. This is where the problem lies.
On the machine that I develop the software, everything works fine.
Outlook isn't used for anything but testing the application so no email
account is configured.
On another machine Namespace.GetIt emFromID always throws a COMException
with the message "Clientoperatio n failed", no mather if the contact
exists or not. Adding a new contact with Application.Cre ateItem works.
The major difference that I can see between the two machines is that the
latter is configured to use exchange for sharing folders includig the
contact folder I want to add the contacts in. I have tried playing with
the permissions of the default and anonymous user, as well as the user I
log in with but it doesn't change a thing.
All help would be very welcome. 5 2056
Are you going thru com interop yourself, or are you using the Office2k3
primary interop assemblies?
You should be using the latter. If you are using them... not sure what
the problem would be.
can you extract an error code or further details, maybe a stack dump?
--
_______________ _________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book with .NET www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------
"Andy" <aj*****@alum.r it.edu> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. . Are you going thru com interop yourself, or are you using the Office2k3 primary interop assemblies?
You should be using the latter. If you are using them... not sure what the problem would be.
I am using the Office PIA's
"Andy" <aj*****@alum.r it.edu> schreef in bericht
news:11******** **************@ u72g2000cwu.goo glegroups.com.. . Are you going thru com interop yourself, or are you using the Office2k3 primary interop assemblies?
You should be using the latter. If you are using them... not sure what the problem would be.
Can't check right now, but IIRC no. The COMException is thrown by
getItemFromID, that is all the stack trace says ... IIRC
"Alvin Bruney" <www.lulu.com/owc> schreef in bericht
news:ux******** ******@TK2MSFTN GP05.phx.gbl... can you extract an error code or further details, maybe a stack dump?
--
_______________ _________ Warm regards, Alvin Bruney [MVP ASP.NET]
[Shameless Author plug] The O.W.C. Black Book with .NET www.lulu.com/owc, Amazon Professional VSTO.NET - Wrox/Wiley 2006 -------------------------------------------------------
"Andy" <aj*****@alum.r it.edu> wrote in message news:11******** **************@ u72g2000cwu.goo glegroups.com.. . Are you going thru com interop yourself, or are you using the Office2k3 primary interop assemblies?
You should be using the latter. If you are using them... not sure what the problem would be.
Isn't there an inner exception? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
Hi
When I open a new outlook email from vb.net, sometimes outlook is very slow
to appear or occasionally outlook freezes completely. I am targeting mixed
office2000/xp environments so I am using the office2000 interop dlls
generated by vs.net by adding office 2000 com reference.
Any one else noticed this problem when targeting office2000/xp mixed
environments? Is there a better, more robust way to do this? Am I better off
using late...
|
by: John |
last post by:
Hi
I am trying to find the way to create an email in outlook. I am using the
code given at the end. It works fine the first time but calling the code
second time gives the following error;
Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.Runtime.InteropServices.InvalidComObjectException: COM object that
has been separated from its underlying RCW can...
|
by: Srinivas |
last post by:
hi all
how to access the outlook user profiles through VB.net
any help....
thanks in advanc
Srinivas
|
by: Li Pang |
last post by:
Hi,
I used following codes to pass a message item from CDO to Outlook. They
worked fine when I used outlook 2000, but get an error of "Specified cast is
not valid." when I used Outlook 2003. Anybody has an ideal?
Dim outlookMsg AsMicrosoft.Office.Interop.Outlook.MailItem
Dim adoMsg As MAPI.Message
outlookMsg =
Microsoft.Office.Interop.Outlook.Application.Session.GetItemFromID(cdoMsg.ID)
|
by: wizzbangca |
last post by:
Hi everyone. Having problems with a utility I am writing for work.
The previous IT Director thoughtfully allowed 3 (2000, xp, 2003)
versions of outlook to be installed rather than 1. Now I need the
utility to work for all 3 versions. A previous post suggested
creating objects to detect the version of outlook, which I tried with
success. But, that's as far as I can get. No one out there shows how
to go beyond version detection to...
| |
by: Pieter |
last post by:
Hi,
On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes an
exception when moving (Move) a MailItem to an Outlook-Folder: The RPC server
is not available. (Exception from HRESULT: 0x800706BA). The client has all
the updates/service packs/ etc isntalled...
Does anybody has any idea why this happens? Any help our hints would be
really appreciated! what is that RPC server thing?
|
by: Pieter |
last post by:
Hi,
I'm using a thight integration with Outlook 2003 (with an Exchange server)
in my VB.NET (2005) application.
Until now I'm using the Outlook Object Model, but it appears to be very
slow, and has some problems:
- doing a Move changes the ReceivedTime of the MailItem
- I can't use RichText in the MailItem.Body (only allows plain text or HTML)
- some other stuff like having to use small 'tricks' to show the default
signature in an email
|
by: Dean Spencer |
last post by:
Can anyone help? I am importing Emails from Outlook using the following
code:
Public Function ScanInbox(SubjectLine As String)
Dim TempRst As Recordset
Dim OlApp As Outlook.Application
Dim Inbox As Outlook.MAPIFolder
Dim InboxItems As Outlook.Items
Dim Mailobject As Object
Set OlApp = CreateObject("Outlook.Application")
|
by: fniles |
last post by:
I am using VB.NET 2005. I created a project using the Microsoft Outlook 8.0
Object Library (Object Model) in my previous machine. Now that I have a new
machine, when I try to compile that program in the new machine, it gives me
erros like "Type 'Outlook.Application' is not defined", "Type
'Outlook.NameSpace' is not defined".
I have MS Outlook in my new machine.
In the new machine when I go to "Add Reference", select the COM tab, the
only...
|
by: Sylfelin |
last post by:
Hello,
If I use Microsoft Outlook 12.0 Object Library (Outlook 2007) COM
Object in my application, the custommer must have the outlook 2007 on
his computer ?
But if i use Microsoft Outlook 11.0 Object Library (Outlook 2003) COM
Object in my application, the custommer must have the outlook 2003 or
outlook 2007 on his computer ?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |