I've written several SubRoutines for sending reports via embedded A97
VBA to OUtlook, but was wondering if there's a way to send from
Access/Outlook 2000 a daily email letting certain users know that my
backups of their databases ran. I'd like to do this from the push of a
button.
In Access97 I was using the trusty:
DoCmd.SendObject acSendReport, "MyReport",_ acFormatRTF,
"Jo*****@abcde.com", , "Here is your report", , False
But now I'm in A2000 and just want to send a message, without an
attachment. Just need "To" "Recipients" "Subject" "Body of Message"
So I need some syntax help with my button if anyone has ever done this?? 11 1421
instead of "acSendReport use acSendMoObject, and delete the "MyReport"
and acFormatRTF
instead of "acSendReport use acSendNoObject, and delete the "MyReport"
and acFormatRTF
Thanks! That works fine.... one more thing: What to do about handling
carriage returns when the body of the email is long like:
"mcrClients ran at 6:30am 4/18 (for SA)
mcrQM_Pressmen ran at 7:15pm 4/17 (for QM)
mcrIncoming ran at 7:15pm 4/17 (for FG)
mcrQMgmt ran at 7:15pm 4/17 (for QM)"
"mcrClients ran at 6:30am 4/18 (for SA) " & char(13) & _
"mcrQM_Pressmen ran at 7:15pm 4/17 (for QM) " & char(13) & _
"mcrIncoming ran at 7:15pm 4/17 (for FG)" & char(13) & _
"mcrQMgmt ran at 7:15pm 4/17 (for QM)" & char(13)
or the whole thing as a single string without the _
Our new Total Access Emailer program will do the trick. It can now
send filtered reports (or tables or queries) to each recipient.
We have a free beta going right now, so you should try it and let us
know how it works. Rather than Outlook, it uses SMTP to avoid the
security issues with Outlook/MAPI. Visit http://www.fmsinc.com/products/emailer/index.asp
If you are concerned about system adminstrative tasks like compacts and
backups, try our Total Visual Agent program. That automates the whole
process and lets you schedule events at night with a complete audit
trail of what was done. It can manage an unlimited number of databases
across your network and notify you via email if a problem occurs. It
can also run as an NT service so you can perform the tasks securely and
handle computer crashes.
Visit http://www.fmsinc.com/products/agent/index.html where you can get
a fully functional 30 day demo version of Total Visual Agent.
Luke Chung
President
FMS, Inc. http://www.fmsinc.com
Since your on a role... the above worked (THANKS!),
How can I put a variable date in the above?
I tried this (but got a compile error):
"mcrClients ran at 6:30am" &Format(Date(), "mm/dd"& "(for SA)" &
Chr(13) & _
I think you left out a parenthesis (and some spaces, which you would
have seen as soon as it worked).
"mcrClients ran at 6:30am " & Format(Date(), "mm/dd") & " (for SA)" &
Chr(13) & _
I am assuming that the format is proper syntax
Ron
Thanks! All is working properly now per below: (except0
.... one problem with syntax is lingering... I get a good carriage
return after the first two lines and the last two lines in this set,
but lines 3, 4, 5, 6 fail to get a carriage return and I get a
continuous string... see any errors?
"Dept. successfully did backups on all databases and executed macros
for feeds to MainData." & Chr(13) & _
"" & Chr(13) & _
"mcrClients ran at 6:30am " & Format(Date, "mm/dd") & " (for SA)" &
Chr(13) & _
"mcrQM_Pressmen ran at 7:15pm " & Format(Date, "mm/dd") & " (for QM)" &
Chr(13) & _
"mcrIncoming ran at 7:15pm " & Format(Date, "mm/dd") & " (for FG)" &
Chr(13) & _
"mcrQMgmt ran at 7:15pm " & Format(Date, "mm/dd") & " (for QM)" &
Chr(13) & _
"" & Chr(13) & _
"Thanks!" & Chr(13) & _
Here's what gets sent:
Dept. successfully did backups on all databases and executed macros for
feeds to MainData.
mcrClients ran at 6:30am 04/19 (for SA)
mcrQM_Pressmen ran at 7:15pm 04/19 (for QM) mcrIncoming ran at 7:15pm
04/19 (for FG) mcrQMgmt ran at 7:15pm 04/19 (for QM)
Thanks!
Boy, you have an interesting situation.
I can't see any logical co-ordination between those that worked and
those that did not.
Since it is NOT acting logically (or we can't see the logic) try some
illogical solutions.
1)I always have my underscore "_" directly after the "&" and you have a
space there. It hardly seems that like that should do it, but it is
worth a try.
2) try adding an extra Chr(13) to the end of the offending line.
3) Maybe, create strings for line1, line2, line3 and line4, load then
before you get there and use the try
"Dept. successfully did backups on all databases and executed macros
for feeds to MainData." & Chr(13) & _
"" & Chr(13) & _
line1 & Chr(13) & line2 & Chr(13) & line3 & Chr(13) & line4 & Chr(13)
&_
"" & Chr(13) & _
"Thanks!" & Chr(13) & _
or
"Dept. successfully did backups on all databases and executed macros
for feeds to MainData." & Chr(13) & _
"" & Chr(13) &_
line1 & Chr(13) &_
line2 & Chr(13) &_
line3 & Chr(13) &_
line4 & Chr(13) &_
"" & Chr(13) &_
"Thanks!" & Chr(13) & _
Ron
Thanks! I found a work-around (see bottom of post)
The "1)I always have my underscore "_" directly after the "&" and you
have a
space there. It hardly seems that like that should do it, but it is
worth a try." ...... I tried this and it gave compile errors (I'm
using A2000 which may be the culprit, I don't recal seeing anything
this weird in A97.
Anyway I put a "" & Chr(13) & _ between each line like this:
"mcrClients ran at 6:30am " & Format(Date, "mm/dd") & " (for SA)" &
Chr(13) & _
"" & Chr(13) & _
"mcrQM_Pressmen ran at 7:15pm " & Format(Date, "mm/dd") & " (for QM)" &
Chr(13) & _
"" & Chr(13) & _
"mcrIncoming ran at 7:15pm " & Format(Date, "mm/dd") & " (for FG)" &
Chr(13) & _
"" & Chr(13) & _
"mcrQMgmt ran at 7:15pm " & Format(Date, "mm/dd") & " (for QM)" &
.... and this work good enough for me ... with the results being:
mcrClients ran at 6:30am 4/18 (for SA)
mcrQM_Pressmen ran at 7:15pm 4/17 (for QM)
mcrIncoming ran at 7:15pm 4/17 (for FG)
mcrQMgmt ran at 7:15pm 4/17 (for QM)
Glad you found a workaround. Very unusual problem. Will have to
watch for it.
Ron This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: qwweeeit |
last post by:
Hi all,
Elliot Temple on the 1 June wrote:
> How do I make Python press a button on a webpage? I looked at
> urllib, but I only see how to open a URL with that. I searched
> google but no...
|
by: Alfred |
last post by:
Hi
I am using access 2002
1.0 I want to email a word or html file using the docmd.sendobject The
document must be send as a attachment.
2.0 Second I would like to tell the Docmd.Sendobject to...
|
by: Ronny Sigo |
last post by:
Hello all,
I am trying to send email via Access. When performing this below routine the
program stops at what I called
the P R O B L E M L I N E.
I have Microsoft Outlook as the default...
|
by: Jimmer |
last post by:
I've got what should be an easy automation problem, but the solution
simply isn't coming to me.
I've got several public variables set up for automation as follows:
Public gappExcel As...
|
by: Lee Seung Hoo |
last post by:
hi~ :)
I need all information of "Automation" or "Automation Object"
what is that ?
why is it useful ?
How can I use that by C# or .Net Framework ?
|
by: Ben K |
last post by:
I saw some posting some time ago regarding a "trick" to automatically
pop up an email editor with attachment using the default mail client.
It is
basically using automation to do the following...
|
by: Sharath |
last post by:
Quality Globe is Glad to Offer you the Fast Track course on
Automation,
QTP Basics and Advanced, and Quality Center
Starting Date: June 4th, 2007
Timings: 10 AM to 3:30 PM
Duration: 50 Hours
...
|
by: Sharath |
last post by:
"Inspired" by the huge success of our first two automation fast track
batches
We are forced to start third fast track automation batch
...
|
by: Sharath |
last post by:
We are glad to inform you that
"Inspired" by the huge success of our first three automation fast
track
batches
We are forced to start fourth fast track automation batch
...
|
by: Sharath |
last post by:
We are glad to inform you that
"Inspired" by the huge success of our first four automation fast
track
batches
We are forced to start fifth fast track automation batch
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |