Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2003, 04:08 AM
Registered User
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rbharatha
Default Working with CDO using VBScript


<SCRIPT LANGUAGE=vbscript>
Sub but_OnClick
    Dim objSession, sOS, StrProfileName
    Set objSession = CreateObject("MAPI.Session")
    set sOS = objSession.OperatingSystem

' look up for the windows NT registry key
if left (sOS,29) = "Microsoft Windows 2000 5.00.2195" then

'if left(sOS,29) = "Microsoft Windows 95(TM) 4.10" then
' HKCU\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem\Profiles\Default Profile
    StrProfileName = "HKCU\Software\Microsoft\Windows NT\Current Version\Windows Messaging Subsystem\Profiles\Default Profile"
else
' look up for the windows registry key
' HKCU\Software\Microsoft\Windows Messaging Subsystem\Profiles\Default Profile
    StrProfileName = "HKCU\Software\Microsoft\Windows Messaging Subsystem\Profiles\Default Profile"
end if
     objSession.Logon StrProfileName'"Microsoft Outlook"
     MsgBox objSession.Inbox.Messages.Count 'This fails w/Access Denied
     objSession.Logoff
End Sub
</SCRIPT>

when i call the sub it says Error - [CDO - [E_ACCESSDENIED(80070005)]]

Ramesh Bharatha





Similar Threads
Thread Thread Starter Forum Replies Last Post
CDO email BananaJim Classic ASP Professional 6 January 27th, 2007 08:04 PM
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.