473,394 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

C#, Outlook, and a nasty error

Who's asking this question:
1. A newbie.
2. This is my second C# program.
3. I've done VB programming in the past.
4. I'm rusty on OOP - usually where I trip up.

Here's what I want to do:
1. Create a task in Outlook from within my program.

I'm using this as a reference:
http://msdn.microsoft.com/library/de...ol03csharp.asp

Doing basic stuff the referenced article, I've started by adding this
code:
// Create an Outlook Application object.
Application outLookApp = new Application();

And I get this error (on the line above):
C:\...\Form1.cs(804): 'System.Windows.Forms.Application.Application()'
is inaccessible due to its protection level
Any ideas on what I'm doing wrong?

Nov 16 '05 #1
1 1114
On 9 Dec 2004 16:56:20 -0800, techprot-google04 wrote:
Who's asking this question:
1. A newbie.
2. This is my second C# program.
3. I've done VB programming in the past.
4. I'm rusty on OOP - usually where I trip up.

Here's what I want to do:
1. Create a task in Outlook from within my program.

I'm using this as a reference:
http://msdn.microsoft.com/library/de...ol03csharp.asp

Doing basic stuff the referenced article, I've started by adding this
code:
// Create an Outlook Application object.
Application outLookApp = new Application();

And I get this error (on the line above):
C:\...\Form1.cs(804): 'System.Windows.Forms.Application.Application()'
is inaccessible due to its protection level
Any ideas on what I'm doing wrong?


To avoid the class name collision use the full namespace name. Ex:

Microsoft.Office.Interop.Outlook.Application outlook = new
ApplicationClass();
--
Tom Porterfield
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: deko | last post by:
When adding Outlook Appointment Items from Access, should I use: Set ol = New Outlook.Application --or-- Set ol = CreateObject("Outlook.Application") Outlook seems to crash either way. The...
14
by: John | last post by:
Hi Is there a way to e-mail using outlook2002 from within vb.net without getting the nasty "An application is trying to access you outlook..." message? Thanks Regards
10
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...
7
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i...
8
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....
2
by: Snig | last post by:
Hi I'm into creating a web application in C# (.NET Framework 1.1) which would list and manage the outlook tasks. If I try to do this in a Windows Application, it works fine. But there are...
14
by: BillCo | last post by:
Hi folks, I have an a2k ap which is called from a batch file via task scheduler on at night - it runs a bunch of updates, imports stuff from other databases and generally preps the main backend...
1
by: dittytwo | last post by:
hi there i have been tasked with automating a simple create email task using microsoft outlook. the code below works create unfortunately it works only at a system level i.e. the user does not see...
4
by: musicloverlch | last post by:
Hi all, I have a database being used by 30 people and is split between the backend and frontend. The database has the ability to send e-mails through Outlook and I have even put Redemption on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.