Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. access denied for CreateObject("Outlook.Application")

access denied for CreateObject("Outlook.Application")

Scheduled Pinned Locked Moved ASP.NET
databasehelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NidhiKanu
    wrote on last edited by
    #1

    Hi all, I have used this code for sending mail using Outlook but its giving access denied problem <% function SendMessages() ' Dim MyDB As Database 'Dim MyRS As Recordset 'Dim objOutlook As Outlook.Application set objOutlook = CreateObject("Outlook.Application") set objOutlookMsg = CreateObject("Outlook.MailItem") set objOutlookRecip = CreateObject("Outlook.Recipient") set objOutlookAttach = CreateObject("Outlook.Attachment") Dim TheAddress Dim ThePhone Dim SendEmail Dim SendPhone Set MyDB = CurrentDb Set MyRS = MyDB.OpenRecordset("tblMailingList") MyRS.MoveFirst ' Create the Outlook session. 'Set objOutlook = CreateObject("Outlook.Application") end function %>

    R C 2 Replies Last reply
    0
    • N NidhiKanu

      Hi all, I have used this code for sending mail using Outlook but its giving access denied problem <% function SendMessages() ' Dim MyDB As Database 'Dim MyRS As Recordset 'Dim objOutlook As Outlook.Application set objOutlook = CreateObject("Outlook.Application") set objOutlookMsg = CreateObject("Outlook.MailItem") set objOutlookRecip = CreateObject("Outlook.Recipient") set objOutlookAttach = CreateObject("Outlook.Attachment") Dim TheAddress Dim ThePhone Dim SendEmail Dim SendPhone Set MyDB = CurrentDb Set MyRS = MyDB.OpenRecordset("tblMailingList") MyRS.MoveFirst ' Create the Outlook session. 'Set objOutlook = CreateObject("Outlook.Application") end function %>

      R Offline
      R Offline
      Rutvik Dave
      wrote on last edited by
      #2

      Because your asp.net dont have permission to acces the Outlook Application. for that in "Run" type dcomcnfg and press enter. now go to Component Services -> Computer -> My Computer -> DCOM Config. then find your "Microsoft Outlook Application". righ click and select "Property". go to Security -> Access Permission -> Customize -> Edit. Now add "Everyone" and Allow both the options ticked. Note : You can search on internet for specific accounts instead of giving access to everyone. I think you can try just "ASPNET", But I am not sure. And why you want to send mail using Outlook. you can use inbuilt classes in .net framework. that is much easier and less resource hungry. MS Office integration will eat up your resource. also there is very difficult to distroy the object. After running this if you see your Taskbar. you will see many running instance of Outlook.exe. that you cannot stop from your web application. I have used Excel so I know this problem.

      1 Reply Last reply
      0
      • N NidhiKanu

        Hi all, I have used this code for sending mail using Outlook but its giving access denied problem <% function SendMessages() ' Dim MyDB As Database 'Dim MyRS As Recordset 'Dim objOutlook As Outlook.Application set objOutlook = CreateObject("Outlook.Application") set objOutlookMsg = CreateObject("Outlook.MailItem") set objOutlookRecip = CreateObject("Outlook.Recipient") set objOutlookAttach = CreateObject("Outlook.Attachment") Dim TheAddress Dim ThePhone Dim SendEmail Dim SendPhone Set MyDB = CurrentDb Set MyRS = MyDB.OpenRecordset("tblMailingList") MyRS.MoveFirst ' Create the Outlook session. 'Set objOutlook = CreateObject("Outlook.Application") end function %>

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Why would you need to use outlook on the server ? You realise this won't use outlook on your users machine, right ?

        Christian Graus Driven to the arms of OSX by Vista.

        N 1 Reply Last reply
        0
        • C Christian Graus

          Why would you need to use outlook on the server ? You realise this won't use outlook on your users machine, right ?

          Christian Graus Driven to the arms of OSX by Vista.

          N Offline
          N Offline
          NidhiKanu
          wrote on last edited by
          #4

          Hi, Now i am not using outlook for sending mail,i m sending mail through .net classes,but thanx for giving feedback for my question N!dh! :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups