Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sendmail method (2003)

    I want to email the current worksheet via Outlook. I have created a form in which the user can, if they wish, add a subject and a body message.

    I want to use the sendmail method because as some people will be using Lotus Notes, I don

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sendmail method (2003)

    Body is not an argument of SendMail. Its syntax is

    wb.SendMail Recipients, Subject, ReturnReceipt

    You can use late binding instead of early binding for the Outlook code. This means:
    <UL><LI>Declare all Outlook-related objects As Object instead of As Outlook.ThisOrThat. Example:

    Dim olApp As Object

    instead of

    Dim olApp As Outlook.Application

    <LI>Use CreateObject or GetObject instead of the New keyword. Example:

    Set olApp = CreateObject("Outlook.Application")

    instead of

    Set olApp = New Outlook.Application

    <LI>Replace all Outlook constants with their value. Example: replace olMailItem with 0. Use the Object Browser (F2) or the Immediate windows (Ctrl+G) to look up those values while you still have a reference to the Outlook library (or in the Outlook Visual Basic Editor)
    <LI>Finally, remove the reference to the Outlook library.[/list]This will prevent errors over missing references.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sendmail method (2003)

    HUGE screenshot cropped by HansV - please don;t post pictures over 640x480 pixeks in size.

    Sorry, Hans, you

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sendmail method (2003)

    Type olMailItem in the Search box and press Enter. It is a member of OlItemType.

  5. #5
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: sendmail method (2003)

    Hans,

    Thanks for your help. (sorry about the screen grab size before

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: sendmail method (2003)

    This is Outlook security. See <post:=488,173>post 488,173</post:> for possible solutions.

Posting Permissions

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