I noticed a difference in the behavior between NT and XP boxes.

 

Here’s my code snippet.

 

HTH.

 

    Set objOutlook = CreateObject("Outlook.Application")

   

    'Set objItem = objOutlook.CreateItem(olMailItem)

    'When automating Outlook with _vbscript_, you must use numeric values rather than constants because _vbscript_ doesn't support Outlook's built-in constants

    ' 0 below is the numeric value for olMailItem.

    Set objItem = objOutlook.CreateItem(0)

 

Lava

 

------------------------------------------------

Lava Boggavarapu

Lava Trading Inc.

95 Morton Street

New York, NY 10014

 

Tel 212.519.9371

Mobile 732.668.2935

www.lavatrading.com

-----Original Message-----
From: AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cathy Jupp
Sent: Tuesday, December 20, 2005 10:57 AM
To: AccessDevelopers@yahoogroups.com
Subject: RE: [AccessDevelopers] Problems emailing from Access 2003

 

Thanks for the suggestion; I am either doing it wrongly or it's not the cause of the problem.  The exact same error is still occurring on some machines and my code now looks like this:

 

Public Sub send_email_externally(EMail_who_to, Email_subject, Email_Message, Optional Email_attachment)

  'Make Outlook message
  '====================
  Dim ol As New Outlook.Application
  Dim olItem As Outlook.MailItem
  Const olMailItem = 0
 
  Set olItem = ol.CreateItem(olMailItem)

 

-----Original Message-----
From: AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of Lava Boggavarapu
Sent: 20 December 2005 15:44
To: AccessDevelopers@yahoogroups.com
Subject: RE: [AccessDevelopers] Problems emailing from Access 2003

I had this problem once.

 

You will need to pass in the actual value (0, I think). Some versions, don’t resolve this constant to the actual value.

 

Lava

 



The information contained in this message and any attachments (the "Message") is intended for specific individual(s), and may be confidential or proprietary. If you are not the intended recipient, please notify the sender immediately, delete this Message and do not disclose. Messages are not secure or error free and can contain viruses and the sender is not liable for any of these occurrences. The sender reserves the right to monitor, record and retain Messages.






Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to