• VCard Edit mode bug

    By Dwight Wilbanks 2 decades ago

    When opening a memo in edit mode with vcard support enabled, I've come accross 2 problems.

    1. If you edit a draft more than once, it appends a vcard for each time you edit the memo
    2. If you receive a memo with body type text instead of rich text and open the document in edit mode, you will get a type mismatch error.



      I've fixed both of these by only runing the vcard add script when the document is new.



      One downside to this, is that if you create a draft, then change your vcard info, the vcard that is sent is the old one. A move complete solution would be more involved, but, probably also involve attaching the vcard before displaying the new note so that the attachment displays on the newly created note.



      Subform: DelOptionSubform



      Sub Postopen(Source As Notesuidocument)

      If getPreference("EnableVCard")(0) = "1" And source.isnewdoc Then