A
Abbarition
I have an Access 2000 file that needs to send out an
email through Outlook 2000. The code I am using is as
follows:
Dim objOl As Object
Dim oItem As Object
Set objOl = CreateObject("Outlook.Application")
Set oItem = objOl.createItem(olmailitem)
With oItem
... etc.
It works fine, but I receive an Internal Application
Error if Outlook is not open. I recently saw the
following code here:
Dim OLF as Outlook.MAPIFolder
Dim olMailItem as Outlook.MailItem
Set OLF = GetObject
("", "Outlook.Application").GetNamespace
("MAPI").GetDefaultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add
With olMailItem
... etc.
However, I receive errors saying I don't have enough
memory when I try to use .Attachments.Add with this
code. Is there a way to either modify the first code so
it opens Outlook (if it's not open), or modify the second
code to use less memory?
Thanks!
email through Outlook 2000. The code I am using is as
follows:
Dim objOl As Object
Dim oItem As Object
Set objOl = CreateObject("Outlook.Application")
Set oItem = objOl.createItem(olmailitem)
With oItem
... etc.
It works fine, but I receive an Internal Application
Error if Outlook is not open. I recently saw the
following code here:
Dim OLF as Outlook.MAPIFolder
Dim olMailItem as Outlook.MailItem
Set OLF = GetObject
("", "Outlook.Application").GetNamespace
("MAPI").GetDefaultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add
With olMailItem
... etc.
However, I receive errors saying I don't have enough
memory when I try to use .Attachments.Add with this
code. Is there a way to either modify the first code so
it opens Outlook (if it's not open), or modify the second
code to use less memory?
Thanks!