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 ?
Asked
Active
Viewed 533 times
3
-
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 Oct 25 '10 at 01: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 Oct 25 '10 at 02:17
1 Answers
4
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.