can you join a batch and .doc

February 14, 2011 at 08:57:25
Specs: Windows 7, 4gb

I have a batch file and a word document. What I want to know is can you join these two files that if you try and open the document, it will firstly run the batch file and then the document. or even if you can do it with an exe file then i can compile the batch into a exe and when you click the document it will open the exe first. is there a way to do this?

Any help would be apreciated

See More: can you join a batch and .doc

Report •

February 14, 2011 at 10:35:16
What you want can't be achieved in that way since you can't join two different kind of files. It is just to add apples and oranges.

The two files have to retain their own identities since .bat is actually a text file to be interpreted by cmd.exe and .doc a structured proprietary file. The same for .exe.

You can code a batch that as its last line open the .doc or code a VBA macro that executes when opening the .doc running the .bat. Both ways assume the .bat or .exe and .doc remain separate entities.

Report •

February 14, 2011 at 12:30:57
ok thanx. what you suggested there i have allready done, just thought i can maybe do it. thank you

Report •

Related Solutions

Ask Question