I wrote an office addin and with which there is a function : openFile(String path) and in the office addin I embed a browser object and with that I can embed a webpage on the office addin, and now I hope I can call the C# function "openFile" and pass in a path in the webpage with javascript, and let office open the designated file for me . Is this possible ? What can I do ?
-
3@Pato and @Rodney Foley: I think you've misunderstood the question. We're not dealing with a ASP.NET client/server environment. The C# code @MemoryLeak is talking about is running locally in a DLL.josh3736– josh37362010-10-25 01:50:48 +00:00Commented Oct 25, 2010 at 1:50
-
It is our fault that MemoryLeak wasn't clear enough? I mean apparently two people not just one misunderstood. Is that any reason to down vote them? Just up vote the one he apparently understand and answered it.Rodney S. Foley– Rodney S. Foley2010-10-25 02:17:47 +00:00Commented Oct 25, 2010 at 2:17
Add a comment
|
1 Answer
Yes it is possible.
This is done via the window.external property (and ObjectForScripting on the host side). See WebBrowser Control Overview under the FAQ.
Happy coding.
Edit: However, there is likely not a way to access the value supplied to a file upload field unless you use a BHO -- this is a secondary question/issue, if it exists.