none
Huge change in item size after copy and paste from Journal item to Calendar Item RRS feed

  • Question

  • Hello,

    I am trying to transfer a large amount of data from a Journal folder to a Calendar folder in Office365.  I'm running VBA code that copies and pastes the body of the message using PasteandFormat(wdFormatOriginalFormatting).  The code works great except the size of the calendar item is way bigger than the original item.  For items that just had formatted text, a common change is 4KB to 9KB.  For items that include images, the change can be more like 165KB to 3MB.  Even if I just do a manual copy and paste I get the same size change. 

    Why would a calendar item be so much larger than a journal item with the same amount of data stored?  Is there anyway that I could avoid this problem?

    Thanks,

    Stacey

    Monday, May 18, 2015 5:57 PM

All replies

  • Keep in mind that appointments, tasks, and contacts store the body as RTF, not HTML, so all embedded images are converted to embedded OLE objects.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, May 18, 2015 6:11 PM
  • Hello Stacey,

    Did you have a chace to compare the size of calendar and journal items without any information stored in the message body? Do you see any difference?

    Appointment items use the rtf markup for rendering the body. But Journal items have only the plain text property - Body.

    Monday, May 18, 2015 6:14 PM
  • Thanks, Dmitry.  I didn't realize that the appointment store used RTF.  I'm sorry for the naive question - but is there any way to use HTML format in an appointment store?  Can I use a different type of body control?  
    Monday, May 18, 2015 7:22 PM
  • You may consider developing an Outlook add-in with a replacement form region where you can use any .Net controls for rendering HTML markup. But you need to store the HTML value using a custom property.

    See Creating Outlook Form Regions for more information.

    Monday, May 18, 2015 7:38 PM
  • Thanks, Eugene!  I am already using a replace-all form region.  I'll give this a shot!
    Monday, May 18, 2015 7:58 PM
  • You can try to perform the conversion yourself using, for example, the Word object model. You can then set the RtfBody property.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, May 18, 2015 10:32 PM
  • Hi Dmitry and Eugene,

    The change in size does mostly seem to be due to pictures.  However, it doesn't matter if I am copying into a calendar item from a journal entry or into another journal item.  Either way, the item size gets much larger after it is copied through the wordeditor property.

    It is turning an object based graphic into an image based graphic.  But, if I right click on the picture and choose "edit picture" prior to copying it, the size doesn't change and object remains editable.  It seems like this conversion occurs when the item is saved.

    Is there some way that I can prevent this conversion from occurring?  We lose a lot of information every time it converts one of our pictures into an image.  This is a big problem for us even if we don't move all of our data to a calendar message class.

    Thanks,

    Stacey


    Friday, May 22, 2015 10:22 PM