locked
Custom document properties are changed automatically while saving as dot file RRS feed

  • Question

  • Hi,

    I have a docx file with custom document properties. If I save the file as a dot file the document properties are changed automatically.

    E.g.

    Property XY with type "Text" and value "01.12.2014" becomes

    Property XY with type "Text" and value "2014-12-01T00:00:00Z"

    I hope the type is the right one, I don't have Word in english.

    What goes wrong? What can I do to prevent this?

    Thanks in advance,

    M.H.

    • Moved by L.Hl Thursday, July 9, 2015 7:08 AM
    Wednesday, July 8, 2015 12:23 PM

All replies

  • Which version of Word (both number and language)? And version of Windows?

    Are you really saving as *.dot, or really as *.dotx or *.dotm?

    Since you've posted this in the Developer forum, could you please show us the code involved in doing the saving?

    Have you tested whether choosing "Template" in File/New as the file type gives you a more stable result?


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, July 8, 2015 1:16 PM
  • Hi,

    I use Word 2010 in german with Windows 7.

    I only posted it in the developer forum because I didn't find any forum for general word problems. I have written code in VBA but the problem already exists if I just use the "Save as" funtion in Word. If I don't have a solution I don't need to write any code.

    Yes, I really mean ".dot". We have customers with very old Office versions and we have to support it.

    Thanks a lot in advance.

    Wednesday, July 8, 2015 1:51 PM
  • Hi M.

    Mmm. I don't see this in the English versions...

    What are your date settings in the Control Panel/Region and Language (Systemsteuerung, wo man die Sprache, Datums- und Nummerformate sowie Tastatur festlegt)? Mine are Swiss German, not the XML international, which is what your date is being changed to.

    <<We have customers with very old Office versions and we have to support it.>>

    If "old" means 2000 - 2003 then those systems can install the "Compatibility Pack" that will allow them to open documents in the new file format. Probably wouldn't support using a dotx template, though...

    What happens if you open the *.dot and change the date back? Does Word still change it?

    Are you allowed to include VBA macros in the template?


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, July 8, 2015 2:29 PM
  • <<I only posted it in the developer forum because I didn't find any forum for general word problems>>

    There's an IT Pro forum on Technet, which might be helpful. I can move the discussion, if you wish.


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, July 8, 2015 2:30 PM
  • Hi M.Hanisch,

    This forum is for Developer discussions and questions involving Microsoft Word, your issue seems to be more related with Word product, I will move this thread to the more related forum.

    Reference: http://social.technet.microsoft.com/Forums/en-US/home?forum=word

    Thanks for your understanding.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, July 9, 2015 7:05 AM
  • Hi,

    thanks for your reply.

    In my first post I say that the property has the type "Text", so it can't have anything to do with the date settings. It is just a string, not a date. I think it is very strange that a text gets a timestamp automatically. My language is German (Germany) and my date settings don't contain a time.

    Meanwhile I tried to save as dotx, but the document is always damaged, if I do this in a VBA macro.

    If I change the property text after open the document, Word keeps it.

    Now I try another way within the VBA macro. I try to save the custom properties and set them after saving as dot. I hope I will be successfull.

    Thanks a lot.

    Thursday, July 9, 2015 8:06 AM