A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Access Automation



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 9th 08, 08:48 PM posted to microsoft.public.outlook.program_vba
Bob Barnes
external usenet poster
 
Posts: 2
Default Access Automation

What is the Outlook method to add an Access Unbound textbox (used for
a "message") in automation.

I have....
Dim Outl As Outlook.Application, MyMail As Outlook.MailItem, N$
On Error GoTo AAA1
N = "C:\BobDev\Sales" & Format(BegDaily, "mmddyy") & "_" &
Format(EndDaily, "mmddyy") & ".snp"
DoCmd.OutputTo acOutputReport, "DailySummary", _
"Snapshot Format", N, False
Set Outl = CreateObject("Outlook.Application")
Set MyMail = Outl.CreateItem(olMailItem)
MyMail.To = "
MyMail.Subject = "Sales Summary" & Format(BegDaily, "mm_dd_yy") & "_"
& Format(EndDaily, "mm_dd_yy")
MyMail.Attachments.Add N

'==Bob..also, I don't want to "Display" the mail and use "SendKeys"..what
command will send the Email w/o displaying it? Thank you.

| 'MyMail.Display
| SendKeys "^{ENTER}"
Set Outl = Nothing: Set MyMail = Nothing
AAA2:
Screen.MousePointer = 1: Exit Sub
AAA1:
Select Case Err
Case Else
MsgBox "Error Number " & Err.Number & " " & Err.Description: Resume
'AAA2 End Select
|
| TIA - B
Ads
  #2  
Old March 9th 08, 09:19 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Access Automation

To set the text for the message body, yse the MailItem.Body or .HTMLBody property. If you don't want to display the message, call the MailItem.Send method, but be aware of the security issue involved - see http://outlookcode.com/article.aspx?ID=52

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bob Barnes" wrote in message ...
What is the Outlook method to add an Access Unbound textbox (used for
a "message") in automation.

I have....
Dim Outl As Outlook.Application, MyMail As Outlook.MailItem, N$
On Error GoTo AAA1
N = "C:\BobDev\Sales" & Format(BegDaily, "mmddyy") & "_" &
Format(EndDaily, "mmddyy") & ".snp"
DoCmd.OutputTo acOutputReport, "DailySummary", _
"Snapshot Format", N, False
Set Outl = CreateObject("Outlook.Application")
Set MyMail = Outl.CreateItem(olMailItem)
MyMail.To = "
MyMail.Subject = "Sales Summary" & Format(BegDaily, "mm_dd_yy") & "_"
& Format(EndDaily, "mm_dd_yy")
MyMail.Attachments.Add N

'==Bob..also, I don't want to "Display" the mail and use "SendKeys"..what
command will send the Email w/o displaying it? Thank you.

| 'MyMail.Display
| SendKeys "^{ENTER}"
Set Outl = Nothing: Set MyMail = Nothing
AAA2:
Screen.MousePointer = 1: Exit Sub
AAA1:
Select Case Err
Case Else
MsgBox "Error Number " & Err.Number & " " & Err.Description: Resume
'AAA2 End Select
|
| TIA - B

  #3  
Old March 9th 08, 10:51 PM posted to microsoft.public.outlook.program_vba
Bob Barnes
external usenet poster
 
Posts: 2
Default Access Automation

Sue - It works, but takes a LLOONNGG time vto send from Outlook.

The "warning Message" about someone might be trying to get Outlook
maddresses appears. Is that "Normal" and is there a way to Block that? I
work w/ a network guy who should be able to help w/ that..maybe.

Thank you - Bob

"Sue Mosher [MVP-Outlook]" wrote:

To set the text for the message body, yse the MailItem.Body or .HTMLBody property. If you don't want to display the message, call the MailItem.Send method, but be aware of the security issue involved - see http://outlookcode.com/article.aspx?ID=52

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bob Barnes" wrote in message ...
What is the Outlook method to add an Access Unbound textbox (used for
a "message") in automation.

I have....
Dim Outl As Outlook.Application, MyMail As Outlook.MailItem, N$
On Error GoTo AAA1
N = "C:\BobDev\Sales" & Format(BegDaily, "mmddyy") & "_" &
Format(EndDaily, "mmddyy") & ".snp"
DoCmd.OutputTo acOutputReport, "DailySummary", _
"Snapshot Format", N, False
Set Outl = CreateObject("Outlook.Application")
Set MyMail = Outl.CreateItem(olMailItem)
MyMail.To = "
MyMail.Subject = "Sales Summary" & Format(BegDaily, "mm_dd_yy") & "_"
& Format(EndDaily, "mm_dd_yy")
MyMail.Attachments.Add N

'==Bob..also, I don't want to "Display" the mail and use "SendKeys"..what
command will send the Email w/o displaying it? Thank you.

| 'MyMail.Display
| SendKeys "^{ENTER}"
Set Outl = Nothing: Set MyMail = Nothing
AAA2:
Screen.MousePointer = 1: Exit Sub
AAA1:
Select Case Err
Case Else
MsgBox "Error Number " & Err.Number & " " & Err.Description: Resume
'AAA2 End Select
|
| TIA - B


  #4  
Old March 9th 08, 10:54 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Access Automation

See the last part of my earlier response.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Bob Barnes" wrote in message ...
Sue - It works, but takes a LLOONNGG time vto send from Outlook.

The "warning Message" about someone might be trying to get Outlook
maddresses appears. Is that "Normal" and is there a way to Block that? I
work w/ a network guy who should be able to help w/ that..maybe.

Thank you - Bob

"Sue Mosher [MVP-Outlook]" wrote:

To set the text for the message body, yse the MailItem.Body or ..HTMLBody property. If you don't want to display the message, call the MailItem.Send method, but be aware of the security issue involved - see http://outlookcode.com/article.aspx?ID=52

"Bob Barnes" wrote in message ...
What is the Outlook method to add an Access Unbound textbox (used for
a "message") in automation.

I have....
Dim Outl As Outlook.Application, MyMail As Outlook.MailItem, N$
On Error GoTo AAA1
N = "C:\BobDev\Sales" & Format(BegDaily, "mmddyy") & "_" &
Format(EndDaily, "mmddyy") & ".snp"
DoCmd.OutputTo acOutputReport, "DailySummary", _
"Snapshot Format", N, False
Set Outl = CreateObject("Outlook.Application")
Set MyMail = Outl.CreateItem(olMailItem)
MyMail.To = "
MyMail.Subject = "Sales Summary" & Format(BegDaily, "mm_dd_yy") & "_"
& Format(EndDaily, "mm_dd_yy")
MyMail.Attachments.Add N

'==Bob..also, I don't want to "Display" the mail and use "SendKeys"..what
command will send the Email w/o displaying it? Thank you.

| 'MyMail.Display
| SendKeys "^{ENTER}"
Set Outl = Nothing: Set MyMail = Nothing
AAA2:
Screen.MousePointer = 1: Exit Sub
AAA1:
Select Case Err
Case Else
MsgBox "Error Number " & Err.Number & " " & Err.Description: Resume
'AAA2 End Select
|
| TIA - B


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Automation Contact Photo Access Alexander Add-ins for Outlook 7 October 11th 07 06:48 PM
Outlook Automation Automation Problem Out of Memory MikeA[_2_] Outlook and VBA 7 July 30th 07 02:31 PM
outlook 2007 automation from Access phleduc Outlook - General Queries 6 June 25th 07 08:48 PM
two calendars automation reiro Outlook - Calandaring 0 March 9th 07 01:42 AM
DBX Files - Automation Dave Outlook Express 4 January 15th 06 05:35 PM


All times are GMT +1. The time now is 03:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.