Auto-email word doc with logo

K

kevin.witty

If anyone has the patience to read all that follows, I'll be amazed. If
anyone has any easy method for emailing a nicely formatted Access report,
not as an attachment, but as the email message itself, skip everything that
follows and send it to me. I'll send you my first-born child. If anyone
can justify why MS didn't just put this ability into Access in the first
place, I'll support you when you run for high office, 'cause you can
convince anyone of anything.

Over the past couple of weeks I've learned more about "Office Automation"
(Hah!) than I really wanted to know, but it's still not enough.

Here's how it started: I produce lovely invoices in Access with the client's
logo imbedded in them that print beautifully. Client decided they'd like to
email them. If everyone could receive snp format and didn't mind opening
attachments, that would be fine, but neither is true. So...

"Piece of cake", I thought. Surely MS's Office Automation should be able to
email an Access report, nicely formatted. Wrong. Turns out rtf is exactly
what it says: rich Text format. So DoCmd.SendObject, which should have been
a winner, wasn't. No graphics, formatting was crappy, etc. DoCmd.OutputTo
had the same rtf limitation when I tried to send the report to Word and
email from there.

So that lead me to Albert's wonderful Merge20, which helped me create a Word
merge document which I could then use, ahem, "Office Automation" to email.
Which worked fine, up to a point: I could create the merge letter, save it
with a new name, and open it up in Word. (This thanks to the fine folks
here.) However, wanting to take the final step, I wanted to automate the
send process. That lead to two problems:

1. Automate the send in the first place. I got part of it, but even with
intellisense, object browsing and searching every help I could find, I could
NOT find any way to supply To:, Subject:, cc, etc. This is what ALMOST
worked:

Function SendWord(tWordDocName As String)
Dim WordApp As New Word.Application ' I know this should be replaced,
but
Dim WordDoc As New Word.Document 'at least it gets me intellisense
With WordApp
.Documents.Open tWordDocName
.Visible = True
.Activate
.Options.SendMailAttach = False ' Client's clients don't like to
open attachments
' How do I supply To:, Subject: etc.? Here, or using WordDoc????
.ActiveDocument.SendMail 'Works, opens up my email program, but
with the doc
'text-only, and with no To:, etc.
End With
With WordDoc
' ????
' .SendMail 'Both objects have a SendMail method. The difference
is????
'The documentation is where???? Not in Help!!
End With
End Function

2. Okay, so give up on automate send, and just use Send from Word. The
client uses Office 2000 on Win/98, I have Office XP on Win2k (having been
told by an MS tech support person I paid for that as long as I didn't use XP
features, I absolutely did not need both on my machine. Another Hah!).

When the client opens the beautifully formatted Word doc (or I open it for
her) and she chooses File Send, she gets this nifty little prompt for the
To:, etc. and can send the doc NOT as an attachment, and it goes pretty
much as it looks, logo and all. (The fact that when she tries to print the
message on her HP LaserJet the logo disappears altogether is another
matter.) When _I_ choose File Send, if Options/General/Send as attachment:
Y/N are set to Y, the doc goes fine as an attachment, but that's not what
the client wants. If set to N, the options are Send for Review (i.e., as an
attachment), or Send as text, neither of which is what I want.

So, did MS leave out the option to send a Word doc as the message, as
formatted, as the message and not as an attachment, in Office/XP, or am I
just missing a setting here? (Admittedly, neither Outlook nor Outlook
Express is my default email package, and OE is for the client.)

(I had actually found an almost perfect solution before I started relying on
"Office Automation": Using Chilkat's excellent email software and Win2PDF
from Dale Prairie, I emailed the Access report as a pdf file, which most
people don't have a problem opening. Unfortunately the client is still on
W/98, and Win2PDF doesn't work on it. I'm working on that. Non-"Office
Automation" took me a couple of hours. "Office Automation" has taken me
days, with no resolution yet in sight. Fie on you, Microsoft!)

Sorry for the verbal diarrhea, folks, but I'm working off two weeks of utter
frustration.

Arrrgghhhhh!

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top