Results 1 to 4 of 4

Thread: emailing

  1. #1
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224

    Unanswered: emailing

    still cant get to automate emailing below is the code
    how do i set it so that the TO field is filled

    Private Sub emaildaily_Click()
    On Error GoTo Err_emaildaily_Click

    Dim stDocName As String

    stDocName = "Daily Log Report"
    DoCmd.SendObject acReport, stDocName

    Exit_emaildaily_Click:
    Exit Sub

    Err_emaildaily_Click:
    MsgBox Err.Description
    Resume Exit_emaildaily_Click

    End Sub

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    Re: emailing

    Hi

    DoCmd.SendObject acReport, "ReportName" , email, "recipient.name", "Cc_recipient.name", , "Subject text", "Message Text"
    should do it I think

  3. #3
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    for the message text .. how do i get text on the next line

    My message text looks like

    TO OPEN
    CLick here and then

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    Re: emailing

    I usually use a variable for message text

    dim strMsg as string

    strMsg = "Your first line for the message." & vbCrLf & _
    "Your Second line of text"

    vbCrLF is VB Carriage Return Line Feed, the _ (you need a space before it) means that VB treats the next line as a continuation of the first.

    cheers

Posting Permissions

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