open a document with C# - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » open a document with C# open a document with C# Last post 06-14-2010 09:01 AM by Hilary Stoupa. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 06-12-2010 03:00 PM Lawson Joined on 12-23-2009 Virginia Posts 91 open a document with C# Reply Contact I have an IP 2003 form with C# code. I would like to code a button that will open a document when it is pressed. Does anybody know how to do this with C# code? Thanks, -Lawson 06-12-2010 03:17 PM In reply to Lawson Joined on 12-23-2009 Virginia Posts 91 Re: open a document with C# Mark as Not AnswerMark as Answer... Reply Contact I am using the following code: this.Application.Documents.Open(@"C:\Users\Lawson\Documents\Test.docx"); But I keep getting the following error: Error 1 'Form_Creator_A.FormCode' does not contain a definition for 'Application' C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs 543 18 Form Creator A 06-12-2010 08:18 PM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: open a document with C# Mark as Not AnswerMark as Answer... Reply Contact Hey there, Lawson! Here's an article that may help you get started opening a Word document with .NET code. Hilary Stoupa 06-12-2010 11:41 PM In reply to Lawson Joined on 12-23-2009 Virginia Posts 91 Re: open a document with C# Mark as Not AnswerMark as Answer... Reply Contact Hey hilary, this is great. You're awesome 8^ ) I aslo want to create a button that will open a video file in Windows Media Player. Can you point me in the right direction on this subject as well? Thanks, -Lawson 06-14-2010 09:01 AM In reply to Hilary Stoupa Joined on 06-20-2008 Posts 13,297 Re: open a document with C# Mark as Not AnswerMark as Answer... Reply Contact Check out this, it looks like it may have enough info to get you started... have fun! Hilary Stoupa Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
I have an IP 2003 form with C# code.
I would like to code a button that will open a document when it is pressed.
Does anybody know how to do this with C# code?
Thanks,
-Lawson
I am using the following code:
this
But I keep getting the following error:
Error 1 'Form_Creator_A.FormCode' does not contain a definition for 'Application' C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs 543 18 Form Creator A
Hey there, Lawson! Here's an article that may help you get started opening a Word document with .NET code.
Hey hilary, this is great. You're awesome 8^ )
I aslo want to create a button that will open a video file in Windows Media Player.
Can you point me in the right direction on this subject as well?
Check out this, it looks like it may have enough info to get you started... have fun!