Coupling Outlook to SQL Server

  • Your article is very good. However, when I run your code in my DTS package, Logon Box prompted. So I should enter password to run through. Then how can I make it a scheduled job and run it automatically? A job cannot take input as far as I know.

    Thank you very much,

    Augustine.

  • >Your article is very good. However, when I run your >code in my DTS package, Logon Box prompted. So I >should enter password to run through. Then how can I >make it a scheduled job and run it automatically? A >job cannot take input as far as I know.

    Assuming the logon box your seeing isn't the DTS owner or user password (in which case Save As and clear those two password textboxes).

    That will probably only happen if the user doesn't have privileges to outlook. Couple of possibilities: Are you using windows auth when accessing sql server? Does that user have access to outlook? What user is sql server using to run? Does that user have access to outlook?

  • Yes, I use windows auth accessing sql server. That user, I, have access to outlook. SQLserver user is the same as that of window user because it uses the windows auth. Here actually, outlook, sqlserver and windows uses all the same windows authentication.

    Thanks,

     

  • Terry, this is exactly what I need. Thanks. Important question for me: The Outlook application you are connecting to is actually on the SQL Server box itself, correct? That is, your code does NOT access the Outlook application on the box of the person that might execute this DTS package. Am I correct?

    Set objOutlook = CreateObject("Outlook.application")

    Set mNameSpace = objOutlook.GetNameSpace("MAPI")

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply