[Outlook] How to get the Range of Recurrence in Event?

Hi All,

Now, I am using VB code to write an Add-in to plug to oultook to get event data . But I don't know exactly How to get the Range of Recurrence???

Below is my code:

Dim myEvent As MYEVENTLib
Dim olEvent As Outlook.AppointmentItem
.....

If olEvent.IsRecurring Then
Set olRecurPattern = olEvent.GetRecurrencePattern
If Not olRecurPattern Is Nothing Then
Set myRecurPattern = myEvent.GetRecurPattern
If olRecurPattern.NoEndDate Then
myRecurPattern.Range = 0 'No End Date
Else If ??? Then
myRecurPattern.Range = 1 'End After
Else
myRecurPattern.Range = 2 'End By
End If
End If
End If

Please help me how to handle it.

Thanks a lot.
dtdphucAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wsteegmansCommented:
Maybe this can help?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaol10/html/olobjRecurrencePattern.asp

What are the different possibilties you're trying to work out?
0
wsteegmansCommented:
Can you please give some more specific information ...

Can you also take a look and close your many many old questions!

1 11/21/2003 500 [Outlook] How to get the Range of Recurr...  Open Programming Languages
2 11/05/2003 100 Outlook:How to distinguish between recur...  Open Visual Basic
3 11/05/2003 100 STL: How to declare the map template???  Open C++ Programming
4 08/13/2003 500 Selectbox does not refresh when changing...  Open JavaScript
5 05/23/2003 200 Using onKeyPress/onChange/onBlur on text...  Open Programming
6 05/02/2003 200 How to prevent the user hits "Enter" key...  Open JavaScript
7 05/02/2003 200 Form will be resetted to blank after the...  Open JavaScript
8 01/21/2003 50 How to fix error when using Require Vali...  Open C#
9 01/10/2003 50 How to get Session variable information ...  Open C#
10 11/27/2002 20 How to use Response.Redirect after using...  Open C#
11 11/07/2002 20 How to get hidden field value from other...  Open C#

Thx!
0
dtdphucAuthor Commented:
Hi Wsteegman,

Firstly, thanks a lot for your answer, but your response is not my purpose. Now I am using the VB to create Add-in App to plug in Outlook. I want to get data from OL and then set them to my App and reverse. But when I catch the OL Recurring Event(Outlook.Appointment), the Range of Recurrence, but the End Date and Occurrence properties are both have value because they auto recalculate if one of them is set. You can refer at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaol10/html/olproOccurrences.asp

And my problem is how to know the user select End By or End
Date optional selection.

By the way, please show me how to close my old questions. Thanks again.

Best regards,
dtdphuc
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

wsteegmansCommented:
dtdphuc,

Can you poste the code where the problem occurrs. Little bit more easy to lookup the problem, ...

Closing your questions:
- Just click on your name (it's a link to your profile)
- Look up 'Question History' and click on 'View'
- All your questions are there

For each question, take a look if there is a good answer. If so, close the question and assign the points to the Expert who gave the answer.
If there was no Comment that helped you, you can also delete the question.

Everything about closing questions (please read this)
http://www.experts-exchange.com/help.jsp#hs5

Regards!
0
wsteegmansCommented:
I was hoping we could continue this question, because I think it is a very interesting one (could also learn something from it)

However, the author found the answer himselves, or doesn't need the answer anymore???????
OK, if the author asked for deleting the question ...

Regards!
0
moduloCommented:
PAQ'd and refunded 500 points.

modulo

Community Support Moderator
Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dtdphucAuthor Commented:
Hi wsteegmans,

Thanks for your interesting. But it is not a critical issue because the data is right (Ex: If you selected "End date" in OL but after sync-ing the seletion change to "End By" because I can only control the occurrence of Recurrence Pattern). Beside I was too busy now for another tasks, I will post my code to sync between OL<-> My App later.

Thanks too much again.
Sorry for my inconvenience.
dtdphuc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.