After creating a journal entry from VBA: how do you attach a file?

  • Thread starter Hector Cabrera via AccessMonster.com
  • Start date
H

Hector Cabrera via AccessMonster.com

Any help? Thanks.
The following code creates a journal entry in outlook:

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts)
Set myItem = myOlApp.CreateItem(olJournalItem)

The following code fills the subject:
myItem.Subject = "Itworks"

How can I insert a file from code? The following code did not work:
myItem.Insert ("c:\files\telecons\2005-02-09-09_30-Wed.doc")

myItem.Save
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top