Automated Sorting Mail from DTS package

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having an issue when automating a process through sql server with DTS.
If I manually run a macro to sort mail based off the subject, it works fine.
When I automate it in SQL server on DTS, it gives me an error saying:
You do not have permission to create a message in this folder.
C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\1033\VbLR6.chm
If I log in as the srvaccount on the same server that runs the macro, and
run it there, it works fine. I am pretty sure I have all the permissions set
up right, I think its a problem of mapping drives. Can anyone help me, the
code breaks on this line:

Set objCurItem = objtargetFolders(0).Items.Item(i)
objCurItem.Move objtargetFolders(k) <---------HERE!@!!!

Thanks.
 
The error is most likely due to whatever account that is running the DTS
package (a scheduled job?) not having write permissions to the folder that
you are moving the message to.
 
Back
Top