Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: email a file

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    Kitchener, Canada
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm using the following code in the middle of a procedure to email a file to another user:

    Dim OL As Object
    Dim MailSendItem As Object
    Dim olmailitem As String
    Set OL = CreateObject("Outlook.Application")
    Set MailSendItem = OL.CreateItem(0)
    With MailSendItem
    .Subject = "Email"
    .Body = strBody
    .To = strEmail
    .Attachments.Add("C:File.xls")
    .Send
    End With

    I state in the user guide that the user must have MS Exchange as it seems to work on my work and home PC (both with MS Exchange). The problem is some users with MS Exchange don't have the email send automatically. Any suggestions???

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi there buddy

    See if this code will work for you :

    Sub EMAIL()


    Mailee = InputBox("Please Enter Name to Send sheet to.........")
    subj = InputBox("Please enter eMail Subject..............")
    Application.Dialogs(xlDialogSendMail).Show arg1:="", arg2:="As Requested"
    Recipients = Mailee.Subject = subj.Close
    End Sub


    Glad to be of assistance to people in need of help



  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Let me know If it does work for you

  4. #4
    New Member
    Join Date
    Feb 2002
    Location
    Kitchener, Canada
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Doesn't work. Get a compile error (Invalid qualifier) on the "Mailee.Subject" statement.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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