+ Reply to Thread
Results 1 to 2 of 2

Thread: Outlook.Send

  1. #1
    Registered User
    Join Date
    02-26-2009
    Location
    India
    MS-Off Ver
    Access
    Posts
    46

    Outlook.Send

    Hello,

    I want to send a message but when i tried to send i got an error message so anyone can tell me the correct syntax to send the message in out look through VBA.
    I m using this code for sending.

    object.send cause a syntax error in my computer

    Code:
    Set OutProg = CreateObject("outlook.application")
    Set OutM = OutProg.CreateItem(olitemType.olmailitem)
    
    With OutM
    .subject = "I am trying"
    .To = "My email address"
    .body = "Here we go"
    .Importance = Outlook.OlImportance.olImportanceNormal
    MsgBox " done"
    End With
    OutM.Send() (syntax error here and am not sure why ????)
    Exit Sub

  2. #2
    Forum Administrator
    Join Date
    03-18-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: Outlook.Send

    Code:
    OutM.Send
    
    If you want to use the parentheses use this:
    
    Call OutM.Send()
    ExlGuru

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0