Open exe application wiith Arguments from Microsoft Word - ms-word

I can easily open my application with arguments through RUN. But I'm having issues trying to start my application with arguments as a hyperlink inside of microsoft word. Is this possible? If not, How can I open my application from inside a word document?
Path to application
"C:\Users\antonioc\Documents\Visual Studio 2012\Projects\NV_Dev\ServerInventory\ServerInventory\bin\Debug\ServerInventory.exe" -SERVERNAME="test"

have you thought of running it from a macro button field? This would give users a clickable link, you could then shell launch application or any otherm,acro supported launch method through the macro.
http://office.microsoft.com/en-gb/word-help/field-codes-macrobutton-field-HP005186171.aspx

Related

Prevent Word on Mac to automatically follow hyperlinks on click

I am developing a Word Add-in application that should work on Word application for both Windows and Mac. I have a problem specific to Word on Mac, while Word on Windows and Word online work as expected.
For business logic reasons my add-in application needs to create and update hyperlinks in the word document. The hyperlink gets updated once the user clicks on it in the document. However, the default behaviour of the Word on Mac is to automatically navigate user to the browser with the hyperlink URL, once he/she clicks on the hyperlink. Incidentally, if you press CMD + click on a Mac, you won't be navigated away from the application.
Is it possible to programatically (using Office/Word Api from the JS driven add-in application) prevent that kind of behaviour on hyperlinks when clicked?
If not, is it possible to capture and cancel the cursor click event on the hyperlink? Or capture it and maybe emit a new event which would simulate "CMD + click", with effect to not navigate from the document?

Read/parse application content

I wanted to see the possibility of getting the text displayed by a certain installed application and running on windows in a certain open window.
Is there a generic way to access the contents of an open window?
Thanks for all your help

Reactivating COM AddIn with Word Interop

I've written a custom ribbon for word. In my winForms-application I also open a word document with word-Interop to create some texts with word.
When I use normal word documents my ribbon is shown correct but when I open the document in my application then the ribbon is gone.
I found out that it is somehow disabled in the COM-AddIn-Options in Word. When I reactivate it manually it appears.
How can I reactivate it programmatically?
[Update]
For better understanding: I have two solutions.
1) A AddIn for Word which displays a ribbon
2) A winform-application which has a winword-control which loads word in it.
When the second one is started the first one is not available anymore.
To answer your question, it's not possible to programatically re-enable your add-in from the add-in itself. Think about it - it doesn't get loaded, so its code won't get run. So nothing you put in your code will re-enable the addin, because it won't get executed.
The only way would be to create a watchdog process that checks if the COM add-in has been disabled every 10 minutes or so, and re-enables it. You'll need to know where Word stores those settings though.

Without using openfiledialog

I want to send files to my application without using openfiledialog....lost??
OK.
You select a file in my documents, in the SendTo menu, I want my application to be an option,
when you select my application, the file that was selected should be add to the list box in my application, the same way it would do if I was using openfiledialog. But I want my application to run in the background, which means I don't want to use openfiledialog.
Please help??
Using .NET 3.5
I believe this is what you are looking for. You do not need to write any code to get your app in the 'sendTo' menu. Just following the instructions here:
HowToGeek - Customize 'Send To' menu
once the files / references are being passed to your app, you will have to write code to handle those command line args

Custom read-host dialog for PowerShell 2 CTP3 ISE

Is it possible to hook a custom dialog into the new PowerShell ISE (Integrated Scripting Environment) that replaces the existing .NET WinForms dialog. I am talking about the dialog that the Read-Host cmdlet launches to request for user input.
For example, see this URL:
http://www.microsoft.com/technet/scriptcenter/resources/pstips/feb08/pstip0208.mspx
Drop the full code into Notepad.
Add the first line:
function read-host {
Add the last line:
}
Copy all the contents from Notepad.
Paste it all into your PowerShell console.
Now, if you call read-host, you're going to see a new Windows Form.
Now, if I open other windows, it remains on top, but it seems it is not the top-most because I see it over everything else, but still need to click on it to make it active.
What you CAN do is create a custom function that overrides Read-Host, so you're effectively usurping Read-Host and subbing your own functionality.
I don't believe you can, no. You'd need to write your own hosting application. The ISE does have its own object model - I'm asking if what you're after is possible.