vb restrict method and minimizing ics windows 
Author Message
 vb restrict method and minimizing ics windows

Hi all:

How can I hide ics windows when using WSH to load them
into Outlook?  Minimizing the window doesn't really solve
the problem, as I can still see the window appear, then be
minimized.  

Also, how can I include date AND time in a vb RESTRICT
method?  I tested it with subject and it worked, but it
resulted in an infinite loop repeating:  

Repetitive appointment found!
Repetitive appointment found!
There is an existing appointment in this time!

The code is in the attachment since it might be too long.  
Any help would be appreciated.  Thankx.
Chris

  importicalendar.txt
4K Download


Fri, 11 Feb 2005 22:13:26 GMT  
 vb restrict method and minimizing ics windows
You can't avoid showing the window. If it doesn't appear, the item can't be
saved.

The relevant portion of your code wasn't that long:

Do Until Appointment(Counter) = ""
    <snip>
    Set TempItem = olFolder.Items
    DateStart = DateSerial(intYear, intMonth, intDay)
    datetocheck$ = "[Start] = '" & DateStart & "'"
    Set myRestrictItems = TempItem.Restrict(datetocheck$)
    For Each TempAppointment In myRestrictItems
        MsgBox "Repetitive appointment found!"
        HasAppointment = True
    Next TempAppointment

    If HasAppointment = True Then
        <snip>
        Counter = Counter + 1
    End If
Loop

I don't see anything that sets the value of items in the Appointment()
array. Looks to me like the Do loop just repeats endlessly. Stepping through
the code should confirm if that's the problem.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming Jumpstart - coming September 2002
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> Hi all:

> How can I hide ics windows when using WSH to load them
> into Outlook?  Minimizing the window doesn't really solve
> the problem, as I can still see the window appear, then be
> minimized.

> Also, how can I include date AND time in a vb RESTRICT
> method?  I tested it with subject and it worked, but it
> resulted in an infinite loop repeating:

> Repetitive appointment found!
> Repetitive appointment found!
> There is an existing appointment in this time!

> The code is in the attachment since it might be too long.
> Any help would be appreciated.  Thankx.
> Chris



Tue, 15 Feb 2005 08:48:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB 6 Help - Grids (ICS project 2)

2. minimize all none VB application windows

3. Minimizing other program's windows from VB?

4. Using like conditions with restrict method

5. Restrict method problem

6. Restrict method parsing error

7. using Restrict items method

8. Creating Items collection using Find method instead of Restrict

9. Filter for RESTRICT method

10. Restrict method

11. Restrict Method with Appointment Items

12. Using Restrict Method

 

 
Powered by phpBB® Forum Software