473,668 Members | 2,308 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 4378
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) programmaticall y? I search online and I saw lot of reviews from other
developers about backing up email messages "Programaticall y" 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...@yaho o.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
4437
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 exchange. What is the best approach for this? Is the answer to write a web service using C# and then call it from Java? Does OWA already provide a set of web services for something like this? If so is there WSDL to go with it?
9
7365
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 Outlook.Application SentFld =
1
4279
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 Integer = 9 Dim olfFolderConflicts As Integer = 19 Dim olFolderContacts As Integer = 10 Dim olFolderDeletedItems As Integer = 3 Dim olFolderDrafts As Integer = 16 Dim olFolderInbox As Integer = 6
2
1100
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 Outlook Address book. I know this can be done by either customizing the form or making an Add-in. I am a VB program but have no experience with outlook programming. Can someone direct me to the right place or give me a hint of how to do this. Any...
7
3031
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 that are windows 2000 based. We recently upgraded from Outlook 2000 to Outlook 2003, and it still works. We have one machine with XP service pack 1. It works fine there. This also was upgraded from outlook 200 to outlook 2003.
4
6679
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?
1
3707
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 C# program, in effect I would like: "select all appointments on my calendar from xx/xx/xx to xx/xx/xx" Can I do a query like this using DASL? If so can anybody help me out with a starting example? Do I integrate it into my C# program using...
4
14589
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 don't care about attachments. I just need the text. Thanks, Shane
4
15059
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 office. No longer. Does anyone know how to do this using the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that are supposed to be the new replacements? Here's what I had that worked until Outlook 2007 came around:
5
2410
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
8374
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
8890
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
8791
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...
0
8653
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 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...
0
7398
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, 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...
1
6206
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.