What code do you have behind the form's Open or Read events? In the meantime, see http://www.slipstick.com/outlook/esecup.htm#autosec

Signature
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
I've got the following code behind the 'Open' form event
and it's essentially for getting the users login id only.
I copied this code from another application and perhaps I
have too much? Can you help identify the unnecessary
code? I.e. not related to just getting the userid?
'This section of code is to get a UserId
'Get data from Session.CurrentUser.
Dim cdoSession 'As MAPI.Session
Dim cdoAddrEntry 'As AddressEntry
Dim strData 'as string
Dim strUserid 'as string
'Define them explicitly or use their value.
dim cdoPR_Account
dim cdoPR_EntryID
Dim vbCRLF
cdoPR_Account = &h3a00001e
cdoPR_EntryID = &h0fff0102
vbCRLF = chr(13) & chr(10)
on error resume next
'Start the CDO code to find a match.
Set cdoSession = CreateObject("Mapi.session")
cdoSession.Logon ,,false,false,0 'Use the existing
Outlook session.
if err.number <> 0 then msgbox "ERROR in logon: " &
err.number & vbCRLF & err.description
'Get the AddressEntry of the recipient/current user.
Set cdoAddrEntry = cdoSession.CurrentUser
'if err.number <> 0 then msgbox "ERROR getting
AddressEntry: " & err.number & vbCRLF & err.description
'Get properties.
strUserid = cdoAddrEntry.fields(cdoPR_Account)
objUserid.value = strUserid
objAuditUserid.value = strUserid
objVacUserid.value = strUserid
objTrdUserid.value = strUserid
objTrdAuditUserid.value = strUserid
'Explicitly release objects.
cdoSession.logoff
'Set cdoAddrEntry = Nothing
Set cdoSession = Nothing
>-----Original Message-----
>What code do you have behind the form's Open or Read events? In the meantime, see
http://www.slipstick.com/outlook/esecup.htm#autosec
>> I've hid both the Appointment and Availability Tabs on the
>> Appointment form to use in the Calendar environment.
[quoted text clipped - 6 lines]
>> Thanks,
>.
Sue Mosher [MVP] - 10 Dec 2003 23:57 GMT
There is no way to avoid a security prompt unless the Exchange administrator has suppressed them, because Session.CurrentUser is a protected object.

Signature
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> I've got the following code behind the 'Open' form event
> and it's essentially for getting the users login id only.
[quoted text clipped - 34 lines]
> 'Get properties.
> strUserid = cdoAddrEntry.fields(cdoPR_Account)
> >"Rob" <anonymous@discussions.microsoft.com> wrote in
> message news:02b201c3bf69$a31305b0$a501280a@phx.gbl...
[quoted text clipped - 12 lines]
> >> Thanks,
> >.