S
Skully
Hi,
To e-mail use the outlook object. You need to add a
reference to it in the VB window Tools|References to
expose the object to your project. Pick Microsoft Outlook
9.0 object library. To save the report to file you should
be able to use Microsoft Scripting Runtime (add a
reference again)
Here's some sample VB for the e-mail stuff
Dim olApp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Set olApp = New Outlook.Application
Set olNewMail = olApp.CreateItem(olMailItem)
'Now set the properties of the email and send it
With olNewMail
..Subject = ""
..To = "(e-mail address removed)" 'If you set up a distributio list
in Access you could put its name here
..Send
'etc etc then close it
..Close (olSave)
End with
'Kill the objects in the exit sub
ExitSub:
Set olApp = Nothing
Set olNewMail = Nothing
Exit Sub
Hope this helps. Do you know how to change the height
property of a GroupHeader/GroupFooter in a report - it
seems to be read-only property????
To e-mail use the outlook object. You need to add a
reference to it in the VB window Tools|References to
expose the object to your project. Pick Microsoft Outlook
9.0 object library. To save the report to file you should
be able to use Microsoft Scripting Runtime (add a
reference again)
Here's some sample VB for the e-mail stuff
Dim olApp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Set olApp = New Outlook.Application
Set olNewMail = olApp.CreateItem(olMailItem)
'Now set the properties of the email and send it
With olNewMail
..Subject = ""
..To = "(e-mail address removed)" 'If you set up a distributio list
in Access you could put its name here
..Send
'etc etc then close it
..Close (olSave)
End with
'Kill the objects in the exit sub
ExitSub:
Set olApp = Nothing
Set olNewMail = Nothing
Exit Sub
Hope this helps. Do you know how to change the height
property of a GroupHeader/GroupFooter in a report - it
seems to be read-only property????