double clicking on the saved file like when we open a .doc file of ms office
What you are talking about is called
file associations, which associate a particular file extension with an application, so that double-clicking one of these files opens the application.
There is an article here that will help get you started:
Associate File Extension with Shell OPEN command and Application[
^]