![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
What is the correct syntax to send the message in out look through VBA
object.send cause a syntax error in my computer 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 |
Ads |
#2
|
|||
|
|||
![]()
OutM.Send
If you want to use the parentheses use this: Call OutM.Send() -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MUSIWA" wrote in message ... What is the correct syntax to send the message in out look through VBA object.send cause a syntax error in my computer 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 |
#3
|
|||
|
|||
![]()
See that is just my problem I keep getting the same error
"application _define or object defined error" and debbug shows me that statement as the problem. Ru time error 287 Did I mess up my defination of the objects? Thanks by the way sorry for insulting your intelligence "Ken Slovak - [MVP - Outlook]" wrote: OutM.Send If you want to use the parentheses use this: Call OutM.Send() -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MUSIWA" wrote in message ... What is the correct syntax to send the message in out look through VBA object.send cause a syntax error in my computer 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 |
#4
|
|||
|
|||
![]()
Do you have a VBA project reference set to the Outlook version installed
there? Send is definitely a method of the MailItem object. Do you show either object in the Object Browser? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MUSIWA" wrote in message ... See that is just my problem I keep getting the same error "application _define or object defined error" and debbug shows me that statement as the problem. Ru time error 287 Did I mess up my defination of the objects? Thanks by the way sorry for insulting your intelligence |
#5
|
|||
|
|||
![]()
Got it Thanks that was it I added it and now we are good. Thanks a bunch!!
"Ken Slovak - [MVP - Outlook]" wrote: Do you have a VBA project reference set to the Outlook version installed there? Send is definitely a method of the MailItem object. Do you show either object in the Object Browser? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "MUSIWA" wrote in message ... See that is just my problem I keep getting the same error "application _define or object defined error" and debbug shows me that statement as the problem. Ru time error 287 Did I mess up my defination of the objects? Thanks by the way sorry for insulting your intelligence |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2003...SEND problem...does not send the 1st time | CJ | Outlook - General Queries | 1 | September 14th 08 06:13 AM |
I can't send attachments with outlook, I can send test email | Harm Logan | Outlook - General Queries | 5 | March 21st 07 07:51 PM |
outlook 2003 has 2 "send" labels in the send receive drop down | oceanfreightrefunds | Outlook - General Queries | 1 | February 14th 07 10:24 PM |
Some items can't be send in outlook 2003. Even after repeatly clicking the send button. | baarts | Outlook - General Queries | 1 | August 9th 06 03:52 PM |
Can't send via outlook 2003 or outlook express 6, but can send to newsgroups | ~AMDT~ | Outlook - General Queries | 5 | March 29th 06 11:31 AM |