none
Embed .wav file in ms word RRS feed

  • Question

  • I am trying to embed .wav file as ole object using c# . 

    If someone has a code snippet , could you please share it ? 

    Friday, August 17, 2018 12:07 PM

All replies

  • I suggest you create a simple document without the file, save it.

    Insert a sample wav file into that document and save under a different name.

    Open the first document in the Open XML SDK Productivity Tool, then use the "Compare" functionality to open the second document. The Tool will generate the code necessary to create the second document from the first - which you can incorporate in your solution.

    You can also use the tool to inspect the underlying Word Open XML of any document.

    Note: You've posted this in the Open XML SDK forum, but it's not clear from your question whether you really want to work with that, or with the Word interop. If the Word interop, then your question ought to be in the Word For Developers forum. And I recommend you begin by recording a macro in Word when inserting a wav file in order to get the objects, methods and properties required for doing so.


    Cindy Meister, Office Developer/Word MVP, <a href="http://blogs.msmvps.com/wordmeister"> my blog</a>

    • Proposed as answer by Simon Wu-MSFT Monday, September 3, 2018 10:12 AM
    Sunday, August 19, 2018 11:46 AM
    Moderator
  • Thanks a lot . 
    Wednesday, August 22, 2018 12:56 PM