Formatting word attachement using VB code from access

VPK_Access

Registered User.
Local time
Today, 23:29
Joined
May 15, 2011
Messages
36
HI,

In a form I have created a button against a drop down of users, clicking on it, all issues pertaining to the selected user (from drop down)will be be consolidated and created as an attachment to the email to be send to the user.

This process works fine.

Now my issue is when I am creating an attachment in Word format, the formatting of the document does not work....meaning the width and height of each cells is not contained. Below mentioned is the code I used.

*******************************
'Attaching the file
strFile = "C:\Email\Followup-" & [Forms]![OpeningForm]![EmailOwnerName] & ".doc"

DoCmd.OutputTo acSendQuery, QueryName, acFormatRTF, strFile, No, , , acExportQualityPrint
MyMail.Attachments.Add strFile, olByValue, 1, "INA Followup file"


*******************************

Now instead of the word document when I use the excel fromat The formatting works fine. Unfortunately I need the attachment in word format only.

Can anyone help me on how to get the formatting right when an attachment is made in Word format?
 

Users who are viewing this thread

Back
Top Bottom