Re: VBaProject.OTM opening while sending a mail

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Andrew Cushen (anonymous_at_discussions.microsoft.com)
Date: 04/03/04


Date: Sat, 3 Apr 2004 10:49:54 -0800

You are seeing the Debug function of Outlook VBA.

The VBAProject.OTM is opening because there is ar error in
your code. The error is in the line that's highlighted.

Without seeing your code, it's hard to know what the
problem is, but try creating the CDO session like this:

    Dim objSession As Object
    Dim strVersion As String
    Set objSession = CreateObject("MAPI.Session")
    
    ' Logon using an existing MAPI session
    objSession.Logon "", "", False, False, 0

If that doesn't help, you'll have to post your code, at
least up to the problem line.

-Andrew Cushen
============================================
>-----Original Message-----
>
>hi,
>
>Iam facing a peculiar problem. i dont know whats
happening here.
>im creating an outlook mail item
>after creating the mail i do Item.Display
>which displays the inspector with a Standard Send Toolbar
>
>however when i click on Send VBaProject.OTM opens and a
portion of code
>where im declaring the CDO object is highlighted
>e.g Public objCDO as MAPI.Session
>
>however the mail is sent to the outbox but i dont know
why this project
>is opening in between. what could be the problem. it has
something to
>do with the CDO thing im using i cant figure out whats
wrong.
>
>So right now im doing a workaround wherein inside the
>Application_ItemSend event im saying Cancel=True and
manually moving
>the mail item to the Outbox. However i dont think this is
correct
>appraoch.
>
>Someone please help!!
>
>thanks
>
>
>------------------------------------------------
>~~ Message posted from http://www.ExcelTip.com/
>~~View and post usenet messages directly from
http://www.ExcelForum.com/
>
>.
>



Relevant Pages

  • Re: GetRows Method
    ... I told you that i dont want your help. ... I simply wanted intellgent answers from intellgent people. ... > It moves the data from the recordset to the aVarray, ... The usual purpose of opening a recordset is to ...
    (microsoft.public.vb.database.ado)
  • To Mike
    ... maybe you dont check replies a couple of days old. ... opening read-only. ... >Hanna, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: question about Linux boxes only running as root
    ... I suspect this person is opening himself to trouble. ... well its a risk yu dont need to take. ...
    (comp.os.linux.misc)
  • Re: Multiple Instance of a form limite
    ... > I dont know about your second question, but I had to do the ... > opposite of the first to keep a user from opening two instances of ...
    (comp.databases.ms-access)