473,624 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Outlook Object Model

Hello Friends

I wrote a simple VB application using Outlook Object Model. This
application is used t send mail via MS Outlook. I wrote following code
on Send button:

Set mailitem = obj.CreateItem( olMailItem)
Set objname = obj.GetNamespac e("MAPI")
mailitem.To = "db*****@pscind ia.com"
mailitem.Body = RichTextBox1.Te xtRTF
mailitem.Subjec t = "TestMail using OL"
mailitem.Send

Control used:
1) RichEdit Box (for formatted message)
2) Send Button
3) Outlook Object Model.

Note: MS Outlook is set to default mail client. Mail format is set to
Rich Text.

Problem:
1) When I click send button. Mail doesn't send immediately. I have to
click Send/Receive button of MS Outlook to send the mail.

2)When I receive a mail,message is appeared as plain text instead of
formatted message. When I looked at Sent folder of MS Outlook
formatted message is displayed.

[Note: If I send formatted mail via MS Outlook all works well means I
received formatted mail.]

Can you please help me in solving above problem?

If problem is not clear feel free to ask any question.

Thanks & Regards
Deepak.
Jul 17 '05 #1
1 8483

"Deepak Bhatia" <de***********@ indiatimes.com> wrote in message
news:e3******** *************** ***@posting.goo gle.com...
Hello Friends

I wrote a simple VB application using Outlook Object Model. This
application is used t send mail via MS Outlook. I wrote following code
on Send button:

Set mailitem = obj.CreateItem( olMailItem)
Set objname = obj.GetNamespac e("MAPI")
mailitem.To = "db*****@pscind ia.com"

^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
[snip]

Try this instead:

mailitem.Recipi ents.Add("db*** **@pscindia.com ")
Take a look at Microsoft Knowledge Base Article - 209948 for more details.
Hope that helps,
-- Shashank
Jul 17 '05 #2

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

Similar topics

3
5946
by: Chuck Farah | last post by:
I am unsuccessfullly trying to display an outlook email from a vb web forms (.net) outlook 2002 #1. is it possible to use outlook client email from a web form using the outlook object model within vb .net for web forms? #2. If not what is recommended (SMTP has problems if the address are not correct). I also have used the Mailto: but am having problems passing the body with formating
3
5722
by: Kurt | last post by:
Hi We are developing an off-the-shelf software suite for a certain business sector. Most of the program is simply a GUI on top of some .mdb files. Its a .net application written in c# One major requirement is "Outlook Integration". The Outlook contact folders are to be used for contact management I want to know what is the standard way to do this these days. Most of the information in MSDN seems rather old I first used the Outlook...
7
5406
by: MLH | last post by:
Is the following remotely correct? =DDE("C:\Program Files\Program Files\Outlook Express\OEmig50","Attachment","Name") I'm not sure that OEmig50.exe is the executable for OE. Anybody know? I find no list of TOPICS to use with the DDE related commands in Access Basic or VBA
6
5362
by: LEBRUN Thomas | last post by:
Hello :) I would like to use Outlook 2003 in my application so for that, i've added the referece to Outlook 11.0 Object Model to my project. Then, I try this simple code : using System; using Microsoft.Office.Interop.Outlook;
2
5807
by: James | last post by:
Is it possible for me to generate Outlook objects in an ASP.NET application on a web server (like a calander event for example) and then attach that object to an email so that the recipient can open it and add a calander event to THEIR Outlook file? I already know how to send mail using the SmtpMail object. If it is possible, how difficult is it? And are there any good examples, tutorials, or books that could point me in this direction...
9
6726
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
2
2444
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
2
2790
by: =?Utf-8?B?QWxleGFuZGVyIEtvbW1lcg==?= | last post by:
Hi, I´m developing a feature in a application with the following specification: In the first step, the application should be able to store messages out of outlook, which are dropped on a tree view. This message should be stored as ..msg file. In future, this should be able for alle objects of outlook. If a drop a message out of outlook, I can get the file name of the message
5
2409
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...
0
8233
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, 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...
0
8170
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,...
0
8675
Oralloy
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...
0
8619
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8334
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,...
0
5561
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();...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2604
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
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.