Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / December 2003

Tip: Looking for answers? Try searching our database.

Appointment Form Customization - Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 10 Dec 2003 22:04 GMT
I've hid both the Appointment and Availability Tabs on the
Appointment form to use in the Calendar environment.  
However, after all has been said and done, when I open my
custom form I get a message stating that the custom form
is trying to access email addresses??  I have to clear
this message every time I open a new form.  It is getting
to be a real bother.  Any way I can disable this?

Thanks,
Sue Mosher [MVP] - 10 Dec 2003 22:49 GMT
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 hid both the Appointment and Availability Tabs on the
> Appointment form to use in the Calendar environment.  
[quoted text clipped - 5 lines]
>
> Thanks,
Rob - 10 Dec 2003 23:07 GMT
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,
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.