Results 1 to 40 of 56

Thread: Email and possibly a Fax with Word [Resolved]

Hybrid View

  1. #1

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Email and possibly a Fax Question with Word

    Word XP (I guess that it's 2002 ? )

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Email and possibly a Fax Question with Word

    Ok, there is no properties for prepopulating that dialog in 2003, but there is a way to include to
    the reciepient in a filed in your recordsource. So if you add a field with the email addresses
    then we can specify to use that feild as the receipient. Also, you can create a separate
    address book and designate that as the listing too.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Email and possibly a Fax Question with Word

    I have a field already that has the email address.
    I also have a subject, and want to send html letters.


    (still spreading points, btw)
    Last edited by dglienna; Feb 18th, 2005 at 02:26 AM.

  4. #4

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Email and possibly a Fax Question with Word

    The field is Email, and is already in the recordset. There are multiple records to each emall address, but we can send out multiple emails.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Email and possibly a Fax Question with Word

    Ok, found the proper way to do this.
    VB Code:
    1. Dim oDoc As Word.Document
    2.     Set oDoc = ActiveDocument
    3.     With oDoc.MailMerge.DataSource
    4.         .FirstRecord = 1
    5.         .LastRecord = .RecordCount
    6.     End With
    7.     With oDoc.MailMerge
    8.         'If OptPrinter.Value = True Then
    9.             '.Destination = wdSendToNewDocument 'wdSendToNewDocument;wdSendToPrinter; wdSendToFax; wdSendToEmail
    10.         'ElseIf optFax.Value = True Then
    11.             '.Destination = wdSendToFax
    12.         'ElseIf optEmail.Value = True Then
    13.             .Destination = wdSendToEmail
    14.             .MailSubject = "RobDog888 VB/Word Guru™"
    15.             .MailAddressFieldName = "FieldThatContainsTheEmailAddresses"
    16.             .MailAsAttachment = False
    17.             .MailFormat = wdMailFormatHTML
    18.             .Execute
    19.         'End If
    20.     End With
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Email and possibly a Fax Question with Word

    Great. I'll try that in a minute. Working on a sample for someone else.

    The only problem is the message that pops up for each message. Is there any easy way around it? I took about 10 minutes to go through 35 records.

    Or maybe could just combine records?

    Anything about the fax problem there?
    Last edited by dglienna; Feb 18th, 2005 at 05:28 PM.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Email and possibly a Fax Question with Word

    This should work, but it depends on how your recordset is setup .

    Now the .Execute wil execute it without showing it to the user. The .Show
    will show it, in case that is an option you need.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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