Alternate data source for folders/explorers (synthesizing mailitems)

  • Thread starter freenews.netfront.net
  • Start date
F

freenews.netfront.net

Hello, I'm looking for a way to display synthesized mailitems in a custom
folder. I don't want to send the items, and I'd prefer they not reside in a
physical folder (.pst or Exchange) at all. Preferably, I'd feed items into
a view from an alternate data source. Once they're diplayed in a view or
inspector, I need to them to behave like normal mailitems for purposes of
moving, replying, etc.

If I can't create a completely "virtual" folder, I'd be satisfied to write
the items to a real folder. But when I save my items, they end up in the
Drafts folder, as mentioned by Dmitry in this newsgroup. I've thought of
listening for an event when items are copied into drafts and moving them
right out. I haven't tried it yet, and I can think of any number of reasons
it wouldn't work, or work poorly.

My latest idea is to create the items as Post items, embedding mail fields
such as to/cc/bcc in the body, and writing my own view and form to display
them more like mailitems. Can anyone comment on the feasibility of this
approach?

If that doesn't work, all I can think of is to host a custom control in the
folder homepage. But it wouldn't have the richness of the explorer/view
control.

Does anyone have any ideas or comments?

Thanks very much,
Gary
 
K

Ken Slovak - [MVP - Outlook]

Why not just move the items if they are in Drafts? Save them and then call
Move on them.
 
F

freenews.netfront.net

Thanks, that works. After that, however, I run into problems because they're
unsent and don't have a sender list. Too bad for me that the sender list is
read-only. Reply, forward, etc, don't work. I'll have to roll them myself,
which means doing the body processing according to the reply/forward
options.

I also have to take over display in a number of places to get my items to
display reasonably. Unsent items have the message "this item hasn't been
sent yet" and don't have reply buttons. It looks like I can work around it
to some extent using a custom form, but I don't know yet how to deal with
Explorers, especially ones that aren't for my folder. The From field is of
course blank; I want to supply the data from a custom field. I don't know if
it's feasible to customize all views. And the preview pane is a complete
mystery - I don't know how it generates its view.

Thanks for helping a begginer!
 
K

Ken Slovak - [MVP - Outlook]

You can't code for the preview pane and you can't code or change the InfoBar
where the status is displayed.

Explorers are for folder views, Inspectors are for open items. If you have
an item you can use item.GetInspector to get a handle to the Inspector for
the item. For an Explorer you can iterate the Explorers collection and check
for Explorer.CurrentFolder to see what it's displaying.

Sent items are different than unsent items in a number of properties that
mostly cannot be set in your code. So you can actually send the item and
then catch it and do whatever with it or you can create a Post item and
before ever saving it you can set many properties, then save it then change
the MessageClass from IPM.Post to IPM.Note. That helps within limits.
 

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

Top