473,385 Members | 1,927 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,385 software developers and data experts.

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.GetNamespace("MAPI")
mailitem.To = "db*****@pscindia.com"
mailitem.Body = RichTextBox1.TextRTF
mailitem.Subject = "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 8473

"Deepak Bhatia" <de***********@indiatimes.com> wrote in message
news:e3**************************@posting.google.c om...
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.GetNamespace("MAPI")
mailitem.To = "db*****@pscindia.com"

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

Try this instead:

mailitem.Recipients.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
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...
3
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...
7
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? ...
6
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;...
2
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...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
2
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...
2
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.