Results 1 to 7 of 7

Thread: VB (VB6)

  1. #1
    New Lounger
    Join Date
    Apr 2003
    Location
    Leicester, England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB (VB6)

    My program picks up info from the database, formats it and prints it on an A4 sheet. I want to be able to email the results. Is this possible?
    <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

  2. #2
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: VB (VB6)

    In Excel VBA I use this:

    With usrAPinvoices
    If usrAPinvoices.optEmailRpts = True Then
    Application.DisplayAlerts = False
    'mailing routine
    Workbooks(ExpFileName).Activate
    mMsg = "This Invoice file created on " & Application.Text(Now(), "dd mmm yyyy HH:mm") _
    & ". Advise Janet C immediately with errors."
    If ActiveWorkbook.HasRoutingSlip = False Then
    ActiveWorkbook.HasRoutingSlip = True
    End If
    With ActiveWorkbook.RoutingSlip
    .Recipients = BranchAdmin 'This is an email address
    .Subject = Branch & " AP Invoices"
    .Message = mMsg
    .Delivery = xlAllAtOnce
    .ReturnWhenDone = False
    .TrackStatus = True
    End With
    Application.DisplayAlerts = True
    Else
    'don't mail
    End If
    End With
    End Sub
    Alan

  3. #3
    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: VB (VB6)

    What do you have available in your environment? I think the CDO (Collaboration Data Objects) library used to be the best choice, but it has been deprived of some functionality by security patches. There seem to be numerous VB controls for every conceivable need, so that's always a possibilty if you simply can't be assured of any system support for e-mail.

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB (VB6)

    I recommend ASPEmail. It's a simple .dll, all you need is the address of an SMTP server.

    Drew

  5. #5
    New Lounger
    Join Date
    Apr 2003
    Location
    Leicester, England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB (VB6)

    Yer, great Drew. Where can I get one from/how do I load it?

  6. #6
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB (VB6)

    A quick search on Google for "ASPEmail" will take you straight to it <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Peter

  7. #7
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB (VB6)

    (Edited by HansV to activate URL's)

    http://www.aspemail.com

    It's by a company called persits software.

Posting Permissions

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