locked
Send Email from Access With .Body as MS Word Template RRS feed

  • Question

  • Hi All,

    I am looking for some code to insert a beautifully formatted Contractor's Bid done in MS Word.  

    I did much research to use, in word:

    1. Template feature

    2. Mail merge

    3. Drawing Canvas

    4. Insert Logo

    5. Text Boxes, etc

    All of this to get a highly professional look.

    Now I want to send this word document in the .Body of my email without loosing this formatting.  I want it to look exactly the same in body of the outlook email as in does in the Word Document.  Some initial testing, copying (with vba) the document to a clipboard and then manually pasting to Outlook, I loose the formatting (different objects in Word shift and loose position) but if I Paste as "Picture", it seems to work.

    How can get this Word Doc successfully into the body of my Outlook .body.

    Many thanks from a skilled but frustrated developer.

    Kody_Devl


    Kody_Devl



    • Edited by Kody_Devl Monday, April 1, 2019 2:15 PM
    Sunday, March 31, 2019 9:02 PM

Answers

  • It's not a matter of can't: if given enough time and resources pretty much anything is possible. I've never done it, but I bet gradient backgrounds are possible in Word, and certainly background images are. However every tool has its strengths and weaknesses, and every tool is build by its developers with its audience in mind.

    If 99% of the audience will choose to "print" a report to a PDF attachment, then how much time are we going to invest in other options, including output to Word?

    One other suggestion I thought about after my last reply was that in the email body you can have a summary of the data - apparently a help desk ticket. That may be enough for many consumers of the report, but those who want high fidelity can use the attachment.


    -Tom. Microsoft Access MVP

    • Marked as answer by Kody_Devl Friday, April 5, 2019 9:08 PM
    Tuesday, April 2, 2019 1:39 PM

All replies

  • Why not directly mail out of Word?

    -Tom. Microsoft Access MVP

    Monday, April 1, 2019 1:51 PM
  • Hi Tom

    I am not exactly sure what you mean, "directly mail" out of Word.

    I am open to suggestions but the client doesn't really want it as an attachment.

    Thanks


    Kody_Devl

    Monday, April 1, 2019 2:23 PM
  • File > Send.

    Of course there is a VBA equivalent to that.

    They may have to swallow their pride about attachments, or be willing to pay a lot more for a report in the body of an email. The whole world runs on attachments.


    -Tom. Microsoft Access MVP

    Tuesday, April 2, 2019 1:54 AM
  • Hey Tom

    By VBA equivalent, I am able to get his numbers, with VBA, but not the beautiful gradient multi-colored background.

    My last ditch effort will be to try to get a:

    doc.Content.Copy (into clipboard (I have this))

    Then

    Paste:
    .editor.Content.Paste (and find an argument with "as Picture" which seems to work when done  manually)

    Ya, I agree and this would have been done weeks ago but the client is using a high end software, myHelpDesk. They email his invoices with a similar format for the invoice format (to the bid) and he wants to keep it parallel.

    But, myHelpDesk also includes a PDF attachment copy of the invoice also. 

    Your advice may be the best.

    So how would I actually say this? Are there any resources that could help me with this?  Would I actually, like just say, "I c...c....can't"?  This would be new territory for me.

    Thanks

    Kody_Devl


    Kody_Devl

    Tuesday, April 2, 2019 9:10 AM
  • It's not a matter of can't: if given enough time and resources pretty much anything is possible. I've never done it, but I bet gradient backgrounds are possible in Word, and certainly background images are. However every tool has its strengths and weaknesses, and every tool is build by its developers with its audience in mind.

    If 99% of the audience will choose to "print" a report to a PDF attachment, then how much time are we going to invest in other options, including output to Word?

    One other suggestion I thought about after my last reply was that in the email body you can have a summary of the data - apparently a help desk ticket. That may be enough for many consumers of the report, but those who want high fidelity can use the attachment.


    -Tom. Microsoft Access MVP

    • Marked as answer by Kody_Devl Friday, April 5, 2019 9:08 PM
    Tuesday, April 2, 2019 1:39 PM