Ask a questionAsk a question
 

Answerediting word storage

  • Friday, August 28, 2009 9:27 AMs0muel Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi.
    Can anyone tell me, why msword delete all created by me "streams" and "storages" in "*.doc" file, when I use "save as" msword menu item. And can You tell me a solution of this problem?
    In this way I`m create s storage

    rez=StgOpenStorage(filename,NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE,NULL,0,&pIStorage);
    rez = pIStorage->CreateStorage(L"NewFolder", STGM_CREATE|STGM_READWRITE|STGM_DIRECT|STGM_SHARE_EXCLUSIVE, 0, 0, &storage);

    ?
    thanks!

Answers

  • Tuesday, September 01, 2009 3:13 PMTom Jebo_DSCMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    s0muel,

    Applications are not required to save storages and streams that are not part of their file format.  Custom storages and streams that are not part of the Open Specifications File Formats (like MS-DOC) are not guaranteed to be retained by Microsoft applications that use these formats.

    If you disagree, identify the specification and section upon which you base the validity of this approach.

     


    Regards, Tom Jebo Senior Support Escalation Engineer Microsoft DS Protocol Team

All Replies

  • Friday, August 28, 2009 2:45 PMTom Jebo_DSCMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi s0muel,

    t
    hanks for your post regarding the MS-DOC protocol specification. I will review your question and update the forum once my investigation is complete. Thanks!


    Regards, Tom Jebo Senior Support Escalation Engineer Microsoft DS Protocol Team
  • Monday, August 31, 2009 4:05 PMs0muel Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Tom Jebo_DSC .

    I also edit a doc file using the basic functions to the working with files (fopen/fread..) and by passing on the necessary offsets modify this file ... all was well until I use Word "File->save-as"...

    I think that Word read only needed it data and re-save after modifications only them. Because my other modifications (such as adding new item) of existing items such as "SummaryInformation" was well...but this is not solve my problem: To wrote some data into document for unique identification file.

    Can You help me? Any suggestions?
    Thanks!
  • Tuesday, September 01, 2009 3:13 PMTom Jebo_DSCMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    s0muel,

    Applications are not required to save storages and streams that are not part of their file format.  Custom storages and streams that are not part of the Open Specifications File Formats (like MS-DOC) are not guaranteed to be retained by Microsoft applications that use these formats.

    If you disagree, identify the specification and section upon which you base the validity of this approach.

     


    Regards, Tom Jebo Senior Support Escalation Engineer Microsoft DS Protocol Team
  • Tuesday, September 01, 2009 3:45 PMs0muel Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank You. It's clear.