overlapping properties 
Author Message
 overlapping properties

I have written some VBScript code, with the aim to copy specific calendar,
task and contacts from an OST file into a PST file. (In a later step I will
want to synchronize changes in the PST with the OST, but that's another
story). My problem is that I have written a routine that copies every
writeable property from one contact to another.
(statement such as:
 oItemTo.Birthday = oItemFrom.Birthday
)

Then I have written a routine that compares these properties again.
(statements such as
 If oItemTo.Birthday <> oItemFrom.Birthday Then
  MsgBox "Birthday:" & oItemFrom.Birthday & " <> " & oItemTo.Birthday &
vbCrLf
 End If
)

It appears that some properties have an awkward behaviour. Until now, I have
found out the following:

xxxAddress is the actual information, xxxAddressyyy are just views on this
information. They are not to be copied when the address is already copied.
Especially not xxxAddressCountry, which, if it was not explicitly present in
xxxAddress, defaults to the country from the locale settings instead of ""

MailingAddress is just a view on one of the other addresses. Which address
is determined by SelectedMailingAddress. If MailingAddress is copied (which
is not needed), and selectedAddress is not copied first, one of the other
addresses is overwritten

I am not sure whether I should copy FirstName, MiddleName, LastName, or just
FullName. Trying them both is trouble!

Copying telephone numbers without an areacode attached automatically adds
the local area code. (which makes the code only correct if you set the local
area code to the location of the person who created the record in the first
place. Hence company-internal phone numbers are out of the question! ).
(The statements:
 oItemTo.HomeTelephoneNumber = oItemFrom.HomeTelephoneNumber
 if oItemTo.HomeTelephoneNumber <> oItemFrom.HomeTelephoneNumber then
    msgbox "Major logical flaw!!"
end if
actually show the message box!)

The four observations above cannot be learned from the object model help
file, so I guess I'll have to code by trial and error (which can never give
me the feeling that my code works). It would be nice to have a place where I
could find out what the dependencies are between different properties, and
how to make sure they are just copied, not changed in the process. I am
already dreading to start doing anything with calendar and task items. Will
I encounter a lot of these cases too ? are there any workarounds ?

Does anyone have a reference to some information about this ?



Fri, 02 Apr 2004 21:05:52 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. determining if time values from two records overlap

2. Overlapping appointments in PF Calendar

3. overlapping appointment-items

4. Highlighting overlapping task bars.

5. Overlapping Objects

6. Overlapping Shapes

7. Shapes overlapping!

8. Preventing overlapping shapes

9. Footer overlapping

10. Text in grouped, overlapping text boxes does not print

11. combo overlap

12. listview command bar overlap problem

 

 
Powered by phpBB® Forum Software