3 questions on OutLook for a beginer

N

NilovSerge

Hello,
I am a beginer in OutLook and I have some questions on OutLook:
1 When I in Form's Designer on one of the page of a mail documen
choose a new CommandButton I could not
create code for clicking on this CommandButton. In Word or Excel b
doubleclicking on this button automatically
wsa opened code editor with code like:
Private Sub CommandButton1_Click()

End Sub
but in outLook it is not working! I have Office 2000 with SR1a an
SR3.
Also I tried to create this code writing code in code editor bu
without success. How can I do it?

2 How can I tune my OutLook to send messages on my computer as i
several people sending messages to one
another without sending messages to Internet really. I working wit
Application_NewMail event and this
very diffecult waiting messages coming from Internet.

3 I created my form based on IPM.NOTE And I create
Application_NewMail event for it As far as I understand
this Application_NewMail event will be triggered for ANY new mail?
will have several different documents
based on IPM.NOTE. So all Application_ events must be common for al
docs? What will be if two different
documents have different Application_NewMail events?
And I need in event Application_NewMail to define if a new mail is bas
on my users for or not. Something like
if NewMail.BaseType= "IPM.Note.ForSigned" then ...

end if
I save my pattern in Form's Designer through "Save as" as a ForSign.of
Pattern file. And when in Form's Designer I
select this pattern for opening in Message Class I see "IPM.Note" bu
not "IPM.Note.ForSigned" how I expected!
What is Wrong
 
K

Ken Slovak - [MVP - Outlook]

Since you are using that horrid ExcelTips interface make sure you post
some of the thread if you reply to this message. That interface
doesn't do that and it makes it impossible to follow a thread.

Application.New_Mail only fires at intervals not for every incoming
item in the Inbox. And as an application-wide event there can be only
one of them. I'd use the ItemAdd event for the Items collection of the
Inbox instead, that will fire for each item that comes in and give you
a handle to the item. It will only fail if a lot of items come in at
once. Tip - try to keep you ItemAdd handler code as short and as quick
as possible so you don't miss other ItemAdd events while you are
handling another instance of that event firing.

Outlook doesn't have a macro recorder like Word does and any
CommandBar objects you add must be added completely in code you write
from scratch. CommandBar objects are children of Explorers and
Inspectors, not the Outlook Application object itself.

You can't simulate a send of an item if it's not going anywhere. An
ItemAdd handler in the Inbox can handle items that are added to that
folder using Copy or Move but the items won't have various properties
set that can only be set by the email transport mechanism after the
items leave Outlook. Most or all of those properties are read-only to
Outlook so you can't even try setting them.

When items come in if they are using your custom form they will have
your form's custom MessageClass. You can test for that using code like
this: If Item.MessageClass = "IPM.Note.MyMessageClass" Then

Use the Object Browser to see what the properties, methods and events
you can use for each type of object.

For forms design information see
http://www.slipstick.com/dev/forms.htm

For Outlook VBA information see http://www.slipstick.com/dev/vb.htm
 

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