Results 1 to 3 of 3
  1. #1
    kazaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    43

    Emailing a dynamic word document


    Currently, I have a form with a button that sends emails to all records in a given record set. My email message is hardcoded, and it has dynamic fields that are different for each record. For example, "Dear rs![First Name], you have been placed in rs![Group Name]..." I have set this up in visual basic as an email object, and my .To field is set to rs![Contact Email Address]


    Is it possible for me to put my email message in a Word document (so that it can be edited without going through the visual basic editor) and then either attach it to each email or put it in the message body (while still maintaining the dynamic fields)?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The only way I know for Word to get data from Access is with mail merge. Then the email would have to be accomplished by Word. Personally, I prefer not to involve multiple apps if I can help it.

    What is it you want to allow edits of - the hard-coded text parts of body? Could use a form for input of this variable text and the VBA can reference the form inputs to construct the email body.

    Then is the question of whether or not to save this user input as a record.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    why hardcode the message? You can put it in a table, so you can create a message for each type of mail you want to send. Whenever you want to add a dynamic field you put it between some marks like ***GroupName*** and the code just reads the text from the table field and replaces the bit of texts with the actual field content like rs![Group Name].

    greetings
    Noëlla

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-18-2013, 12:32 AM
  2. Embed word document into form
    By jgelpi16 in forum Forms
    Replies: 4
    Last Post: 06-26-2012, 11:31 AM
  3. Create new Word document.
    By Bill H in forum Programming
    Replies: 3
    Last Post: 06-12-2012, 06:40 AM
  4. Dynamic Emailing
    By EliOklesh in forum Forms
    Replies: 3
    Last Post: 08-25-2011, 08:51 PM
  5. Import Word document using VBA
    By degras in forum Import/Export Data
    Replies: 4
    Last Post: 04-12-2011, 02:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums