Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Object required error when setting MAPImessages1.SessionID

Status
Not open for further replies.

wombatbill

Programmer
Jul 10, 2001
8
GB
In Visual basic 5 I have tried the following code and get the "Object Required" error message when it reaches the SessionID code and cannot understand why.

Private Sub Form_Load()
MAPISession1.Signon
MAPIMessages1.SessionID = MAPISession1.SessionID

I originally had quite a bit of code below this and the form had "Send To" , "Subject" and "Text" Boxes.

I have removed all my Code and just replaced it with
MAPIMessages1.Compose
MAPIMessages1.Send True
MAPIMessages1.Signoff
End Sub

I have the Microsoft MAPI Controls 5.0 included.

When I run the module I get my normal Outlook mail login, password etc., I assume this means that the signon is working okay, which seems to be backed up by the fact that In Debug the MAPISession1.SessionID has a value. Which incidentally appears to be different each time I try to Run (I would assume this to be normal).

Any help with fixing the above would be most appreciated

Bill G.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top