How to create a new form showing all types

R

Roland Sommer

Hi,

as a VB programmer I like to know, how to create a new form with
Outlook showing all type of objects (mail, task, calendar ...) within
a listbox. This ist only for simply learning and playing around.

I've tried to find information via searching the internet, but the
more I read the more I get confused. So can someone here post (or
mail) a very simply example or tell me, that ist is not possible.

TIA
Roland
 
S

Sue Mosher [MVP]

You would need to create a VB user form with a list box, list view, or flex
grid control on it and write code to populate that control with information
from the items you want to include in the list. Each Outlook folder has an
Items collection that contains all the items in that folder.

Note that this doesn't seem to be related to Outlook custom forms, the topic
of this particular discussion forum. An Outlook form is used to display an
individual Outlook item.
 
R

Roland Sommer

* Sue Mosher said:
Note that this doesn't seem to be related to Outlook custom forms, the topic
of this particular discussion forum. An Outlook form is used to display an
individual Outlook item.

ok, you're right, I forgot to mention that I will do this within
Outlook. So I don't
want VB and access via the application object, but create a new form
within
Outlook and fill a listbox or a grid using VBA. But I don't know how
to start.

Of course I know how to create a new form, but I can choose only Note,
Task ... but I want to have an empty one to start. Or am I wrong? So
how can
I create a new form with a listbox as an easy example?
 
R

Roland Sommer

* Sue Mosher said:
Note that this doesn't seem to be related to Outlook custom forms, the topic
of this particular discussion forum. An Outlook form is used to display an
individual Outlook item.

ok, you're right, I forgot to mention that I will do this within
Outlook. So I don't want VB and access via the application object, but
create a new form within Outlook and fill a listbox or a grid using
VBA. But I don't know how to start.

Of course I know how to create a new form, but I can choose only Note,
Task ... but I want to have an empty one to start. Or am I wrong? So
how can I create a new form with a listbox as an easy example?
 
S

Sue Mosher [MVP]

Unless you want to get into quite complex Extended MAPI/C++ programming,
your form must be based on one of the six standard forms. The Post form is
the simplest. The article at http://www.outlookcode.com/article.aspx?ID=32
has information on working with a list box on an Outlook custom form.

That said, let me repeat: An Outlook custom form is used to display a single
Outlook item. Your scenario doesn't seem to be interested in creating
Outlook items using your custom form. Why then are you seeking to use an
Outlook custom form for this scenario instead of a user form in Outlook VBA,
which works pretty much the same as a user form in VB?

Also note that the code behind a custom form is VBScript, not VBA.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
R

Roland Sommer

Sue said:
Unless you want to get into quite complex Extended MAPI/C++ programming,
your form must be based on one of the six standard forms.

ok, that was missing in my knowledge.
That said, let me repeat: An Outlook custom form is used to display a single
Outlook item. Your scenario doesn't seem to be interested in creating
Outlook items using your custom form. Why then are you seeking to use an
Outlook custom form for this scenario instead of a user form in Outlook VBA,
which works pretty much the same as a user form in VB?

You're right, user forms is what I was searching for (but due to my
lack of
knowlegde I searched in the wrong area). So now I can start develop my
sadly
missed functionality.

Thank you very much, Sue.
 
R

Roland Sommer

Sue said:
Unless you want to get into quite complex Extended MAPI/C++ programming,
your form must be based on one of the six standard forms.

ok, that was missing in my knowledge.
That said, let me repeat: An Outlook custom form is used to display a single
Outlook item. Your scenario doesn't seem to be interested in creating
Outlook items using your custom form. Why then are you seeking to use an
Outlook custom form for this scenario instead of a user form in Outlook VBA,
which works pretty much the same as a user form in VB?

You're right, user forms is what I was searching for (but due to my
lack of knowlegde I searched in the wrong area). So now I can start
develop my sadly missed functionality.

Thank you very much, Sue.
 

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