Sending a report by mail (1 Viewer)

ylivne

Registered User.
Local time
Today, 12:28
Joined
Jul 1, 2009
Messages
11
Hi
I have to send a report to many people.
I have only the "sending as attachment option". I tried to extract the report to Word and send it from there, but then the line separators and the fields borders are erased from the formatting and the report becomes unreadable.

Can you help with one of the problem:
- Sending an open report by mail (not as attached file)
- Extracting all the formatting to Word

Thanks in advanced
Yael
 

Mr. B

"Doctor Access"
Local time
Today, 14:28
Joined
May 20, 2009
Messages
1,932
What version of Access are you using?
 

Mr. B

"Doctor Access"
Local time
Today, 14:28
Joined
May 20, 2009
Messages
1,932
ajetrumpet,

Actually I had forgotten about the Snapshot. Good thinking.

The reason that I asked about the Access version is that in 2007 there is an options to create a PDF document and that PDF could also be sent by email.
 

Mr. B

"Doctor Access"
Local time
Today, 14:28
Joined
May 20, 2009
Messages
1,932
After re-reading your OP, I see that you saying that you want the information in the report to appear in the body of the email and not actully send something as an attachment. Sorry for not reading your posting more carefully.

Can you help with one of the problem:
- Sending an open report by mail (not as attached file)
- Extracting all the formatting to Word


I'll have to think about this as far as sending the report without attaching it as an object.

I am not sure just how "Extracting all the formatting to Word" would help. You would still have to send the Word document as an attachment.

I don't know, but it might be possible that if you are using Outlook and Word as your email editor that you could create an email template that wuold be like a merge document and then somehow insert the appropriate data (field by field) into that template. Just thinking outside the box. I have never even tried anything like what I just tried to pull out of my already empty head. :rolleyes:

Perhaps someone else has an idea.
 

stephengrenfell

Registered User.
Local time
Today, 21:28
Joined
Jul 1, 2009
Messages
19
Hi,

Did you find a solution to the problem of embedding the report in the body of an email ?.

I need to do something similar for customer orders..

thanks
 

darbid

Registered User.
Local time
Today, 21:28
Joined
Jun 26, 2008
Messages
1,428
I can think of a couple of ways to do this. I have done it from WORD but if you move your report to excel first then you can do it as well.

The first idea I had is that from most office programs you can send the document as email - eg FILE > SEND TO

This below is from word so from access you would need to get the Office Object first. DISADVANTAGE = Microsofts security will activate twice in this once cause you are playing with email addresses and once when you send it. Dam annoying
Code:
ActiveWindow.EnvelopeVisible = Not ActiveWindow.EnvelopeVisible
    
    Dim myEnvelope As MsoEnvelope
    Dim myitem As MailItem

    Set myEnvelope = Application.ActiveDocument.MailEnvelope
    Set myitem = myEnvelope.Item
    
    myEnvelope.Introduction = "Loser Competition"
    
    With myitem
    .Recipients.Add "Donald.DUCK@lunapark.com"    
    .Subject = "YOU CAME FIRST"    
    .send    
End With
The second is similar to the first
Code:
ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
    .Subject = "Loser Competition"
    .AddRecipient  "Donald.DUCK@lunapark.com"    
    .Delivery = wdAllAtOnce
End With
ActiveDocument.Route
Finally the more traditional method is that you are going to have Outlook as an object and thus a new Mailitem. To the mail item you are going to add "To" and subject.

At least for word documents you can try
Code:
 .Body = ActiveDocument.Content
obviously you must change "ActiveDocument" to a Word Document object.

Maybe for excel you could make it "Range" or something like that.
 

Users who are viewing this thread

Top Bottom