Hi,
I have an vb.net app that emails attachment(s) as designated by the user to a list of people. There can be one or many attachments as selected by the user on the form. The following code generates the email:
oMailitem = oOutlook.CreateItem(Outlook.OlItemType.olMailItem)
oMailitem.To = "someone@somewhere.com"
oMailitem.Subject = "Emailing attachments"
oMailitem.Body = "Some sort of text."
'Attach any attachments
For a = 0 To dtAttach.Rows.Count - 1
drAttach = dtAttach.Rows(a)
oMailitem.Attachments.Add(drAttach.Item(1).ToString)
Next
oMailitem.Send()
The code works fine for awhile as it loops through the list of people to send to and grabs the attachment(s), but eventually I start getting the following message:
"Can't create file: finename.doc. Right-click on the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions on the folder."
So - it seems like I have lost permission to access the folder. However, this is definately not the case.
Has anyone come accross this?
Thanks,
Peter
I have an vb.net app that emails attachment(s) as designated by the user to a list of people. There can be one or many attachments as selected by the user on the form. The following code generates the email:
oMailitem = oOutlook.CreateItem(Outlook.OlItemType.olMailItem)
oMailitem.To = "someone@somewhere.com"
oMailitem.Subject = "Emailing attachments"
oMailitem.Body = "Some sort of text."
'Attach any attachments
For a = 0 To dtAttach.Rows.Count - 1
drAttach = dtAttach.Rows(a)
oMailitem.Attachments.Add(drAttach.Item(1).ToString)
Next
oMailitem.Send()
The code works fine for awhile as it loops through the list of people to send to and grabs the attachment(s), but eventually I start getting the following message:
"Can't create file: finename.doc. Right-click on the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions on the folder."
So - it seems like I have lost permission to access the folder. However, this is definately not the case.
Has anyone come accross this?
Thanks,
Peter