Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Jan 2003
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail Templates (2000)

    Hi,
    Im trying to sent emails through outlook, however i can't seem to get it to use stationary or a template file.
    This is the code im using. Everything works except the stationary/template part.

    Dim stDocName As String
    Dim xTemp As String

    xTemp = "X:#StationaryHot Shots Email.oft"

    stDocName = "Inquirys"
    DoCmd.SendObject acSendNoObject, , acFormatHTML, [EmailAddress], , , , , , xTemp


    Any Ideas?
    Also... can anyone recomend a tutorial or method of seting up bulk mailing in outlook?

    Adrian

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Templates (2000)

    Is the # part of the directory name of #Stationary? Is this causing you grief?

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Templates (2000)

    I have just setup and tested your SendObject code.
    What I found was, it is objecting to the [EmailAddress] variable in this line. As soon as I changed this to a string expression with an email address in it, it brought up the email window.

  4. #4
    Lounger
    Join Date
    Jan 2003
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Templates (2000)

    "Everything works except the stationary/template part."
    Yes the # is part of the directory name.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Templates (2000)

    I agree that the # makes no difference.

    Does it bring up the email window prompting entry of subject etc?

  6. #6
    Lounger
    Join Date
    Jan 2003
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Templates (2000)

    Yes everything works, the box comes up. I just cant get it to use a mail template (*.oft) or stationary file (*.htm) in the body of the message.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Templates (2000)

    I have run out of ideas on this one.

    Maybe someone else has some.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Mail Templates (2000)

    The online help for the templatefile parameter says: "A string expression that's the full name, including the path, of the file you want to use as a template for an HTML file." Stationery might be HTML, but OFT files most likely are not.

    The alternative to SendObject is to automate Outlook, assuming all relevant users have Outlook. For more information, see Microsoft Knowledge Base Article 209948 - HOW TO: Use Automation to Send a Microsoft Outlook Message using Access 2000.

Posting Permissions

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