Task reminder not working via Citrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shakss2
    New Member
    • Dec 2007
    • 19

    Task reminder not working via Citrix

    Hi,

    I have a application which creates a task in outlook on the click of a button.

    I have made set reminder true.
    It works fine when it tried on the desktop.

    But wne tried the same application via citrix,
    The task gets created but the reminder option is not getting checked (on the task screen) due to which the reminder does not popup.

    This happens even after set reminder is true.

    Code:
    Public Sub AddOutLookTask()
     
    Dim appOutLook As Outlook.Application
    Dim taskOutLook As Outlook.TaskItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set taskOutLook = appOutLook.CreateItem(olTaskItem)
    With taskOutLook
    .Subject = "Due Date for Service Request ID: " & Form_testing.txtSERV_REQ_I & " is: " & Form_testing.dtDD
    .Body = "Due Date for Service Request ID: " & Form_testing.txtSERV_REQ_I & " is: " & Form_testing.dtDD
    .ReminderSet = True
    ' minutes from now.
    .ReminderTime = DateAdd("h", 10, Form_testing.dtDD)
     
    .DueDate = DateAdd("h", 20, Form_testing.dtDD) ' Set the due date to
     
    ' 5 minutes from now.
     
    .ReminderPlaySound = True
    'add the path to a .wav file on your computer.
    .ReminderSoundFile = "C:\Win95\media\ding.wav"
    .Save
    End With
    End Sub
    Thanks in advance.
    Shaq
    Last edited by Stewart Ross; May 26 '08, 09:35 AM. Reason: added code tags to delineate code section
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. I have very limited experience with Citrix, but I think I can see what might be wrong. At line 20 there is a specific-path reference to a sound file on drive C. When you access remote facilities via Citrix your local C drive is mapped to an aliased drive which is not C (at home I think my C drive is mapped by Citrix to H$ or somesuch - my normal 'home' drive on my work network is H). Absolute path references to drive C are bound to fail when remapped to other values by Citrix.

    Why would this prevent your reminder from being ticked? Since the path reference will fail the Save will not be run, hence the reminder failure.

    You could remove the absolute reference to the sound file (it is not good practice to include such references in any event), or put a save before the sound file reference as well.

    You also need to consider explicit error trapping so that the code does not just throw an application-specific error if something goes wrong (as I think it will be doing at present).

    -Stewart
    Last edited by Stewart Ross; May 26 '08, 09:55 AM. Reason: added new suggestion

    Comment

    • Shakss2
      New Member
      • Dec 2007
      • 19

      #3
      Hi..

      Thanks for the reply.
      I did remove the below code.

      .ReminderPlaySo und = True
      'add the path to a .wav file on your computer.
      .ReminderSoundF ile = "C:\Win95\media \ding.wav"

      but if U check the complete code,
      there is a line : .ReminderSet = True

      Inspite of this line of code, the reminder on the task is not checked.

      But the desktop copy does thsi fine.

      Thanks,
      Shaq

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Hi Shaq. Having removed the sound-related lines I suggest you set a breakpoint at the start of the Sub step through each line one by one. As the task is being set, but not the reminder, it suggests that you are accessing Outlook OK as an automation server. You need to make sure that the .Save step for the reminder is occurring correctly, as if the reminder is not being saved setting .ReminderSet true will have no effect.

        Other than that I cannot think of any further suggestions to offer at present until you go through the debug/code step-through sequence.

        My strong feeling is that you still need some form of error handling in your code, even if it is truly rudimentary (such as On Error Resume Next), to guarantee code execution. I wonder, for example, why the C: file assignment did not trigger an error? Anyway, step through the code and see that the .Save is being triggered. You will have access to the local variable window when you do this, and can check the values of variables set or accessed by your code.

        -Stewart

        Comment

        Working...