473,509 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Outlook Programming using C#

Hey folks,

I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"

Any help?

thanx
-anku

Apr 9 '07 #1
5 4371
anku,
I doubt that the Outlook Object Model provides methods to move messages from
one .pst store to another physical .pst store. You will most likely need to
extract the messages into an array or collection object, switch to using the
new pst file, and then save all the messages into the requisite folder in the
new one.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"anku" wrote:
Hey folks,

I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"

Any help?

thanx
-anku
Apr 9 '07 #2
Hi Peter,

I think I made it some what complicated in my previous posting....I
want to move messages from my Inbox to .pst file NOT from one .pst to
another.

-anku

"Peter Bromberg [C# MVP]" wrote:
anku,
I doubt that the Outlook Object Model provides methods to move messages from
one .pst store to another physical .pst store. You will most likely need to
extract the messages into an array or collection object, switch to using the
new pst file, and then save all the messages into the requisite folder in the
new one.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"anku" wrote:
Hey folks,

I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"

Any help?

thanx
-anku
Apr 9 '07 #3
Same concept. Your Inbox is in a given pst file that the Outlook Object Model
is using as its datastore.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"anku" wrote:
Hi Peter,

I think I made it some what complicated in my previous posting....I
want to move messages from my Inbox to .pst file NOT from one .pst to
another.

-anku

"Peter Bromberg [C# MVP]" wrote:
anku,
I doubt that the Outlook Object Model provides methods to move messages from
one .pst store to another physical .pst store. You will most likely need to
extract the messages into an array or collection object, switch to using the
new pst file, and then save all the messages into the requisite folder in the
new one.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"anku" wrote:
Hey folks,
>
I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"
>
Any help?
>
thanx
-anku
>
Apr 9 '07 #4
So my question is how to back up email messages (i.e. move from Inbox to .pst
file) programmatically? I search online and I saw lot of reviews from other
developers about backing up email messages "Programatically" in outlook, but
they didn't provided good explanation of how to do that.

thanx
-anku

"Peter Bromberg [C# MVP]" wrote:
Same concept. Your Inbox is in a given pst file that the Outlook Object Model
is using as its datastore.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"anku" wrote:
Hi Peter,

I think I made it some what complicated in my previous posting....I
want to move messages from my Inbox to .pst file NOT from one .pst to
another.

-anku

"Peter Bromberg [C# MVP]" wrote:
anku,
I doubt that the Outlook Object Model provides methods to move messages from
one .pst store to another physical .pst store. You will most likely need to
extract the messages into an array or collection object, switch to using the
new pst file, and then save all the messages into the requisite folder in the
new one.
Peter
>
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
>
>
>
>
"anku" wrote:
>
Hey folks,

I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"

Any help?

thanx
-anku
Apr 9 '07 #5
I would reccomend looking at www.freevbcode.com

there are quite a few good examples there

but; I'll have to say that Outlook comes with it's own programming
language; and it sure isn't C#!

VB is the worlds most popular language; this C# _CRAP_ was never
invented

HTH

-Todos


On Apr 9, 1:44 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
anku,
I doubt that the Outlook Object Model provides methods to move messages from
one .pst store to another physical .pst store. You will most likely need to
extract the messages into an array or collection object, switch to using the
new pst file, and then save all the messages into the requisite folder in the
new one.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net

"anku" wrote:
Hey folks,
I have created two empty.pst files and it created two empty folders both
named "Personal Folder". This is fine, but my problem is I have two .pst
files, p1 and p2. I want to move Inbox messages to Inbox of p1 and Sent
messages to Sent folder of p2. I am not sure how should I create two
different folder in two seperate .pst files and then move messages. I know
how to move message between folder, don't know how to move message to .pst
since both .pst files appear as "Personal Folder"
Any help?
thanx
-anku- Hide quoted text -

- Show quoted text -

Apr 9 '07 #6

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

Similar topics

6
4431
by: Boris Tabenkin | last post by:
Hi all, I want to apologize if this is the wrong forum for this question. I would like to write an application, in Java running on UNIX, that would insert, read, and mark as completed tasks in...
9
7348
by: John | last post by:
Hi I am using the following code to search for an email message with id myID; Dim SentFld As Outlook.MAPIFolder Dim Email As Outlook.MailItem Dim I As Integer OutlookApp = New...
1
4270
by: Peter | last post by:
I found this code and it works great. Is there any way to up date the code to export attachments to (c:\Exports)? =================================================== Dim olFolderCalendar As...
2
1096
by: Shahin | last post by:
Greetings, I have a problem. I have a client that has an database full of email address. He wants me to make it so when he types an email in the TO box that it check the database instead of...
7
3019
by: John | last post by:
Having a problem sending emails through vb.net. Our inhouse software automatically sends an email to the programming staff whenever an error is encountered. This code works just fine on machines...
4
6667
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...
1
3696
by: Crash | last post by:
I am having a tough time finding documentation on DASL! 1) What the heck does DASL stand for - I can't even find any documentation on that? Anyway, I would like to integrate a DASL query into my...
4
14569
by: SStory | last post by:
I want to drag a message from Outlook to a richtextbox on a vb.net form. I don't get the message body. I have searched all over the place and found nothing. Does anyone know how to do this? I...
4
15040
by: Brian Hampson | last post by:
I recently upgraded to Outlook 2007 B2TR and have found that I can no longer code against MAPI.DLL It's gone :( Using C#, I used to get the MAPI session, and from that I could change the out of...
5
2406
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
7234
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
7136
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
7505
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...
0
5652
agi2029
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,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
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...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
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 ...
1
775
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.