<p>Is it possible to embed an audio object (mp3, wma, whatever) in a web-enabled InfoPath form ?  </p>

<p>If it is, how do you do it ?</p>

[{'answer_id': 34744, 'author': 'Martin', 'author_id': 770, 'author_profile': 'https://Stackoverflow.com/users/770', 'pm_score': 0, 'selected': False, 'text': "<p>Edit:  My apologies, I missed that the question was about Web forms - for which the below does not work.  Must learn to read the question fully!</p>\n\n<ol>\n<li>Go to menu View</li>\n<li>Click on Design Tasks</li>\n<li>Select Controls in the 'Design Tasks' Task pane</li>\n<li>Click on the 'add or remove custom controls' button to install your custom\ncontrol</li>\n<li>Click on the Add button and select ActiveX Control</li>\n<li>Select the Windows Media Player control</li>\n<li>Select the necessary properties for databinding and finish the wizard.</li>\n</ol>\n\n<p>After you have added the control, you can drag and drop the control on your screen.\nRight-Click on the control and select the 'Windows Media Player properties'\nFill in the URL to automatically embed the file to play.</p>\n"}, {'answer_id': 34891, 'author': 'Jason Z', 'author_id': 2470, 'author_profile': 'https://Stackoverflow.com/users/2470', 'pm_score': 1, 'selected': False, 'text': '<p>@Martin</p>\n\n<p>That works for local forms that open in InfoPath.  Nathan was asking about web-enabled forms.  ActiveX controls are disabled for web forms, as evidenced by the informational label at the bottom of the design controls when the form compatability has been set to the web.</p>\n\n<p>Now, I will admit that I know nothing about the HTML tags to play audio in a browser, but I have something else that might work.  I had an InfoPath form that I needed to dynamically load an image into for a web-enabled form.  Similar to the ActiveX issue, the Picture control was also disabled.  What I did was put some managed code behind the form and execute the following when the form loaded.</p>\n\n<pre><code>public void FormEvents_Loading(object sender, LoadingEventArgs e)\n{\n    string imgPath = "http://yoursite/yourimage.jpeg";\n\n    XPathNodeIterator xpni = MainDataSource.CreateNavigator().SelectSingleNode("/my:FormName/my:RichTextControlName", NamespaceManager).SelectChildren(XPathNodeType.All);\n    xpni.Current.InnerXml = "&lt;img xmlns=\\"http://www.w3.org/1999/xhtml\\" src=\\"" + filePath + "\\" width=\\"200px\\" height=\\"55px\\" /&gt;";    \n}\n</code></pre>\n\n<p>I don\'t see why you couldn\'t take the same approach and load audio rather than an image.</p>\n'}, {'answer_id': 35143, 'author': 'Nathan DeWitt', 'author_id': 1753, 'author_profile': 'https://Stackoverflow.com/users/1753', 'pm_score': 2, 'selected': True, 'text': "<p>It looks like you can't embed <code>&lt;object&gt;</code> tags in a richtext field.  I'm getting nothing when I do it.  </p>\n"}, {'answer_id': 35843, 'author': 'bryansh', 'author_id': 211367, 'author_profile': 'https://Stackoverflow.com/users/211367', 'pm_score': 0, 'selected': False, 'text': "<p>Have you tried manually modifying the XSL in order to generate HTML which embedds your audio file?</p>\n\n<p>I don't think there is a way to do this using the InfoPath Designer, but if it ends up in the XSL; it may just get passed through to the web enabled form.</p>\n"}]
['https://Stackoverflow.com/questions/34717', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1753/']