Announcement

Collapse
No announcement yet.

Getting an outlook property

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting an outlook property

    Hi All,

    Got my PB9, now need help with getting properties from outlook, Seems to work as far as resolving recipient to get the default shared calendar but then I fall short

    Code:
    #COMPILE EXE
    #DIM ALL
    #INCLUDE "win32api.inc"
    #INCLUDE "OUTLOOK.INC"
    
    FUNCTION PBMAIN () AS LONG
      DIM Outlook        AS INT__Application
      DIM myNamespace    AS INT__NameSpace
      DIM CalendarView   AS INT__CALENDARVIEW
      DIM myRecipient    AS Recipient
      DIM CalendarFolder AS MAPIFolder
      DIM TimeScale      AS LONG
      DIM RES            AS INTEGER
    
      Outlook = ANYCOM "Outlook.Application"
      IF ISFALSE(ISOBJECT(Outlook)) THEN EXIT FUNCTION
    
      CALL Outlook.GetNamespace (UCODE$("MAPI")) TO myNamespace
      LET myRecipient = myNamespace.CreateRecipient(UCODE$("helpdesk"))
    
      CALL myRecipient.Resolve TO Res
      
      IF Res THEN
        LET CalendarFolder = myNamespace.GetSharedDefaultFolder(myRecipient, %olFolderCalendar)
        LET CalendarView = CalendarFolder
    
    'everything works to here. how do I get the dayweektimescale property??
        CalendarView.DayWeekTimeScale 
        MSGBOX FORMAT$(TimeScale)
      END IF
    
    
    END FUNCTION

  • #2
    'everything works to here. how do I get the dayweektimescale property??
    CalendarView.DayWeekTimeScale
    MSGBOX FORMAT$(TimeScale)
    If I were you, I will try:

    Code:
    TimeScale = CalendarView.DayWeekTimeScale 
    MSGBOX FORMAT$(TimeScale)
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      Originally posted by José Roca View Post
      If I were you, I will try:

      Code:
      TimeScale = CalendarView.DayWeekTimeScale 
      MSGBOX FORMAT$(TimeScale)
      Thanks, tried that, get "Program tried to read or write to invalid memory address"

      Resolve is working, just cant use full name or email address, seems you have to use users login name.

      IE. I cant use "Jim Smith" which is what outlook shows me and I cant use [email protected] but it works with just jim.
      Last edited by Neil J Hosgood; 27 Aug 2008, 05:02 AM.

      Comment


      • #4
        OK, Probably has something to do with Office 2007? I have already had to comment out a folder method that contained "moveit" from outlook.inc generated by PB9 com browser as it conflicts with the new WINAPI.INC. Is there anyone using outlook 20007 (with or without Exchange) and PB9 that can test this? I can't even get my own dayweektimescale

        Comment

        Working...
        X