locked
Issue with file mapping when mapping a file loaded by Microsoft.Office.Interop.Word. Interface RRS feed

  • Question

  •       I'm facing a problem while mapping a file into my process memory; 

    The file i'm trying to map is already loaded by a Word.Application instance; ie  the library Microsoft.Office.Interop.Word, which loads the Word Document and uses to Print the document.


    The original file name is "SITEMAN-PILOT-08 - GAC2 (2)", but when i map this file to my process using ::MapViewOfFile function using the file handle from Word instance it shows
    the filename as SITEMAN-PILOT-08 - GAC2 _2_  ; the paranthesis in the original file is getting replaced with "_", underscore character.

    Is there any reason for this behaviour?




    Thanks
    Sebastian

    Thursday, January 22, 2009 4:59 AM

Answers

  • You posted this question on January 20, then deleted that message when you posted this new one...

    The reason you did not get a response to your original question is that your problem is in no way related to the VSTO technology, the topic of this forum. Nor does it have anything to do with the Word object model (interop interface). I have no idea why you might be seeing the behavior you're getting, nor apparently has anyone else in this forum.

    I'm going to move this question to the "Where is the forum for..." forum, as it's not even clear which programming language you're using (it looks like C++, perhaps?). Please append that information to the message thread so that you can get redirected to a place more appropriate for the question.

    FWIW, perhaps you should test whether parentheses are generally a problem with the method you're using, and not just with Word files? Please also note that all Office applications put file locks on files that are opened in the application, so you may run into difficulties due to that (not necessarily related to this question).
    Cindy Meister, VSTO/Word MVP
    Thursday, January 22, 2009 10:25 AM
  • Try asking in the VC# forum on MSDN.

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Monday, September 10, 2012 5:49 AM

All replies

  • You posted this question on January 20, then deleted that message when you posted this new one...

    The reason you did not get a response to your original question is that your problem is in no way related to the VSTO technology, the topic of this forum. Nor does it have anything to do with the Word object model (interop interface). I have no idea why you might be seeing the behavior you're getting, nor apparently has anyone else in this forum.

    I'm going to move this question to the "Where is the forum for..." forum, as it's not even clear which programming language you're using (it looks like C++, perhaps?). Please append that information to the message thread so that you can get redirected to a place more appropriate for the question.

    FWIW, perhaps you should test whether parentheses are generally a problem with the method you're using, and not just with Word files? Please also note that all Office applications put file locks on files that are opened in the application, so you may run into difficulties due to that (not necessarily related to this question).
    Cindy Meister, VSTO/Word MVP
    Thursday, January 22, 2009 10:25 AM
  •       I'm facing a problem while mapping a file into my process memory; 

    The file i'm trying to map is already loaded by a Word.Application instance using library Microsoft.Office.Interop.Word.


    The original file name is "SITEMAN-PILOT-08 - GAC2 (2)", but when i map this file to my process using ::MapViewOfFile function using the file handle from above Microsoft.Office.Interop.Word instance it shows
    the filename as SITEMAN-PILOT-08 - GAC2 _2_  ; the paranthesis in the original file is getting replaced with "_", underscore character.


    I'm using C# language in my project.


    Is there any reason for this behaviour?




    Thanks
    Sebastian


    Monday, March 30, 2009 2:38 PM
  • Try asking in the VC# forum on MSDN.

    Thanks!


    Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)

    Monday, September 10, 2012 5:49 AM