Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert Picture (03)

    Within the body of a message I am using ".HTMLBody" to provide a text message along with some images. What I would like to do is insert a picture as opposed to referencing the picture to a site.

    Example of Code:
    With iMsg
    Set .Configruation = 1Conf
    .to = "YourEmailAddress@123.com"
    .from = "MyEmailAddress@xyz.com"
    .Subject = "Hello"
    .HTMLBody = "This is for the body of the message"[img][/img]
    End With

    This works just fine as long as the individual receiving my e-mail message has access to the Internet. How can I go about inserting the picture in the HTMLBody precisely where I want it to go? Folks who travel download their message and then read them later without access to the Internet.

    Thanks,
    John

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

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Picture (03)

    Hans,

    I have encounted the following message with this snippet of code " Dim oSession As MAPI.Session".

    I believe I have all the preferences set correctly.

    Thanks,
    John

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

    Re: Insert Picture (03)

    MAPI is the CDO library - you'll need a reference to the Microsoft CDO 1.21 Library (1.21 is the version on my PC, yours might be different).

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Picture (03)

    My version is Microsoft CDO for Windows 2000 Library and it still will not recognize the MAPI.

    Regards,
    John

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

    Re: Insert Picture (03)

    Sorry, no idea then. I don't use CDO myself. You could try these Google searches to see if you can find something you can use: Google Search and Google Groups.

  7. #7
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert Picture (03)

    Thanks Hans,

    I have been to the Google Search to look for assistance. Outside of attaching the picture to the e-mail and obtaining the CID code of the attached file and then putting it into an HTML body doesn't work for me. I would like to simply embed the file without attaching it.

    I'll keep on surfing (been doing this for the past two hours) and have not had much luck.

    Regards,
    John

  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: Insert Picture (03)

    There is an option on the bottom of the Format menu when composing an HTML message to "Send pictures from the Internet." This embeds the bits when you send the message. This is defaultable under Tools>Options..., Mail Format tab, Internet Format... button. I think the better default is to leave it turned off, but if this needs to be an automated solution, perhaps you will need to turn it on by default.

    Regarding the article Hans referenced, could it be a typo? The variable declaration is in the part of code for Outlook objects, and Outlook does have a session object. Perhaps it was meant to be Outlook.Session? I haven't tested that theory.

Posting Permissions

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