#  Other Applications & Softwares  > Outlook Formatting & Functions >  > [SOLVED] Excel VBA Open Outlook Template as a template for editing

## brucemc777

I don't know if this is possible, but I want the user to be able to open a template selected from a menu and 
The template remain as a templateWhen the user clicks "Save" the template is eitherSaved to the same location it was called from, or at the user's discretionSaved as a new template under a new name.

Creating the menu system is not the problem here; it is having Outlook preserve the Template as a Template rather than converting it into a message to be sent. If there is a way to keep it as a template then I suspect the second part of the problem, directly saving it as a template, is probably solved.

The frustration presently is in opening the template using the following code (tbFileLocation" is the fully qualified file path and template file; i.e., "C:\Users\me\Documents\Peanuts.oft"):




```
Please Login or Register  to view this content.
```


Is this possible? Possibly "CreateItemFromTemplate" is my mistake?

It is a huge inconvenience that every time one manually selects to save as a template Outlook insists on switching back to the default central location-

Thank-you very much, folks-

----------


## brucemc777

No problem Bruce!

I know this isn't _exactly_ what you were looking for, but this will get the job done:

Take a look at this first.

All you need do is to establish the "MailItem" variable as a public object, let's call it "oPubOutMail", and for simplicity's sake, another public String variable which we will call "strPubOFTFileLocation".

Change your previous code as follows:



```
Please Login or Register  to view this content.
```


Now create another command button labeled "Save Template" or the like that includes the following code:




```
Please Login or Register  to view this content.
```


(We use the numeral "2" instead of the keyword "olTemplate" because you are using Late Binding, though you could have placed a public enumeration in your code as Cytop showed you how to do on another one of your inquiries as well)

Open the template as you would normally do and make your edits.

Once done, run the above code along with any other actions you need like setting visibility of various buttons and the like; it will save the file to the intended location. 

Just a note: the file will be saved, but remains open. It can be hidden by other open programs so you will want to close that out too. I will ask you if you wish to save it, but you don't, as it is meaning if you want to save it as a regular mail item.

It's great to be schizophrenic. I would give my other self a reputation star for this if I could.

Posted in case anyone else in the future is looking for a similar solution.

----------


## brucemc777

By the way Bruce, if you want to make that email that opened up go away, then just modify that last bit of code to:



```
Please Login or Register  to view this content.
```

----------

