Connecting to Outlook 'Saved Items' folder using win32ole

A

Alex DeCaria

Can anyone tell me how to connect to the 'Saved Items' folder in Outlook
using WIN32OLE? I can get to all the other folders using
GetDefaultFolder(), but I can't seem to get to the 'Saved Items' folder
this way. mapi.Folders.Item('Saved Items') doesn't do it either.

Thanks in advance. Alex
 
B

Bill Davenport

I'm curious. Are you connecting to Outlook through an Exchange Server
or a stand-alone client?

Bill
 
A

Alex DeCaria

Bill said:
I'm curious. Are you connecting to Outlook through an Exchange Server
or a stand-alone client?

Bill

Bill,

I'm connecting through an exhange server. I am able to access my inbox,
deleted items, etc., and also my 'personal folders'. I just can't
figure out how to get to the 'saved items'.

Alex
 
B

Bill Davenport

Alex said:
Bill,

I'm connecting through an exhange server. I am able to access my inbox,
deleted items, etc., and also my 'personal folders'. I just can't
figure out how to get to the 'saved items'.

Alex

Alex,

I have ubuntu and if I open a file browser and you should be able to
connect the Exchange server. This will let you view the contents of your
Sent Items.
dav://<owa link>/exchange/<user account>/Sent%20Items

I haven't used the win32ole so I chose to use what Exchange uses
natively -- WebDAV. I hope this helps.

If you know what you're looking for within the Sent Items folder I have
some code.
 
A

Alex DeCaria

Alex,
I have ubuntu and if I open a file browser and you should be able to
connect the Exchange server. This will let you view the contents of your
Sent Items.
dav://<owa link>/exchange/<user account>/Sent%20Items

I haven't used the win32ole so I chose to use what Exchange uses
natively -- WebDAV. I hope this helps.

If you know what you're looking for within the Sent Items folder I have
some code.

Bill,

Thanks for your time and patience. It's actually the 'Saved Items' that
I'm trying to access, not the 'Sent Items' (which I am able to access).
Underneath the 'Saved Items' I have a bunch of sub-folders where I am
storing e-mails that are kept on our server. If I move one of those
folders into the 'Personal Folders' I can then access it, but then it is
on my local machine and no longer on our server.

So my issue is, I can get to 'Inbox', 'Sent Items', 'Appointments',
'Deleted Items', and 'Personal Folders', but just not 'Saved Items'.

I think my issue is a WIN32OLE issue, but again I thank you for your
time in trying to help.

- Alex
 
B

Bill Davenport

Bill,

Thanks for your time and patience. It's actually the 'Saved Items' that
I'm trying to access, not the 'Sent Items' (which I am able to access).
Underneath the 'Saved Items' I have a bunch of sub-folders where I am
storing e-mails that are kept on our server. If I move one of those
folders into the 'Personal Folders' I can then access it, but then it is
on my local machine and no longer on our server.

So my issue is, I can get to 'Inbox', 'Sent Items', 'Appointments',
'Deleted Items', and 'Personal Folders', but just not 'Saved Items'.

I think my issue is a WIN32OLE issue, but again I thank you for your
time in trying to help.

- Alex

I misread. Is 'Saved Items' a folder you created. Look at the structure
I don't see it. I don't see it in OWA or in Outlook either.

bill
 
A

Alex DeCaria

Bill said:
I misread. Is 'Saved Items' a folder you created. Look at the structure
I don't see it. I don't see it in OWA or in Outlook either.

bill

Bill,

Yes, actually it is one I created. I should have been more specific.
But I did create it on the server-side of things, so it resides as a
subfolder under my 'Mailbox'. I'm now thinking that may be why I can't
access it, because maybe WIN32OLE can't recognize it.

Alex
 
B

Bill Davenport

Alex said:
Bill,

Yes, actually it is one I created. I should have been more specific.
But I did create it on the server-side of things, so it resides as a
subfolder under my 'Mailbox'. I'm now thinking that may be why I can't
access it, because maybe WIN32OLE can't recognize it.

Alex

I created a 'Saved Items' and was able to access it using WebDAV.

Try this in irb.

require 'uri'
require 'net/http'
include Exchange
uri_path = URI.parse("http:////<owa link>/exchange/<user
account>/Sent%20Items/<filename>.eml")
request = Net::HTTP::Get.new(uri_path.path, {"translate" => "F"})
login = "login"
pass = "password"
request.basic_auth(login, pass)
response = Net::HTTP.start(uri_path.host) {|http| http.request(request)}
response.body

BTW: I have to leave on a trip. Good luck with you project.

-bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top