ajit Posted December 25, 2008 Share Posted December 25, 2008 Hi I have been trying to write a script to open a test.dot file as a new document (document1 - Microsoft Word) as it opens on double clicking the test.dot file. I tried Fileopen without any success. Any help would be appreciated. Thanking in anticipation Ajit Link to comment Share on other sites More sharing options...
FireFox Posted December 25, 2008 Share Posted December 25, 2008 @ajit Use ShellExecute (execute file with appropried application) ShellExecute("file.dot") Link to comment Share on other sites More sharing options...
ajit Posted December 25, 2008 Author Share Posted December 25, 2008 @ajit Use ShellExecute (execute file with appropried application) ShellExecute("file.dot") Thanks very much for your prompt reply I tried ShellExecute but still the file would not open as Document1; It still opens as test.dot whereas i want it to open as Document1 without the name "test" as it would open on double clicking it. Thanks again Ajit Link to comment Share on other sites More sharing options...
FireFox Posted December 25, 2008 Share Posted December 25, 2008 @ajit Haa...Ive just understand Check for hotkeys and check for classlist of your word window Here for new document its CTRL+N in example ShellExecute("file.dot") WinActivate("[CLASS:OpusApp]","") WinWaitActive("[CLASS:OpusApp]","",3) Send("^n") Link to comment Share on other sites More sharing options...
ajit Posted December 25, 2008 Author Share Posted December 25, 2008 Actually, test.dot file opens as Document1 - Microsoft Word on double clicking it whereas when i use right click menu >> Open it opens as test.dot.right click menu >> New opens it as Document1 - Microsoft Word, the way i want, but i dont know how to make a script for that.Have i missed something??Thanks againAjit Link to comment Share on other sites More sharing options...
ajit Posted December 25, 2008 Author Share Posted December 25, 2008 Actually, test.dot file opens as Document1 - Microsoft Word on double clicking it whereas when i use right click menu >> Open it opens as test.dot.right click menu >> New opens it as Document1 - Microsoft Word, the way i want, but i dont know how to make a script for that.Have i missed something??Thanks againAjitThanks very much for your replies.Sending ^n opens a new document altogether (with no text as in original template) making it useless as a template.Double clicking it opens the file as Document1 - Microsoft Word whereas opening from the context menu >> Open opens it as test.dot - Microsoft Word (not what i want), though there is also an option in context menu >> New, which is what i want.Thanks againAjit Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now