Results 1 to 6 of 6

Thread: <?> Outlook...Attachments

  1. #1

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    Sending emails...jFound the problem I was having getting it to work on NT
    Code:
    'this works
    With objOutlookMsg
    .To = Rst!email
    .Subject = mySubject
    .Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
    .Importance = olImportanceHigh
    .Send
    '***.what code adds an attachment in the form of a file.***
    End With
    
    What I require is the line of code or other to add an
    attachment to the email. Anyone have this handy.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    Here you go

    Hope you'll find whatu looking for??

  3. #3

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Thanks, I will check it out but from it's description it uses winsock and I am using Outlook Object. Outlook has it's own file attachements button, so there has to he a way to access the code from within the object.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    Maybe you'll find something here

    I did'nt have the time to read it, but they talk about
    attachement in the item collection.

    Hope it helps

  5. #5
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    ...


    'this works
    With objOutlookMsg
    .To = Rst!email
    .Subject = mySubject
    .Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
    .Importance = olImportanceHigh
    .Send
    '***.what code adds an attachment in the form of a file.***
    .Attachments tpath 'where tpath is the full path of the file
    End With

    Try that... (May be)

  6. #6

    Thread Starter
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Thanks all..here is the scoop.

    Code:
    'declare the attach object
    Dim objOutlookAttach as Object
    
    'declare the string for the attachement
    Dim strAttach as string
    strAttach = "C:\mytext.txt"
    
    With objOutlookMsg
      .To = Rst!email
      .Subject = mySubject
      .Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
      .Importance = olImportanceHigh
    '******   set the attachments  *******
      Set objOutlookAttach = .Attachments.Add(strAttachments)
      .Send
    End With




    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

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



Click Here to Expand Forum to Full Width