#1
|
|||
|
|||
.DOTM files not opening as .DOCX with userform
I have completed a userform that opens multiple templates depending upon user choices and inputs data from the userform into these templates. The user is then supposed to use "save as" to save the opened and modified files as new documents on the system. The issue I have is that when the templates are opened they are retaining their original location/filepath and .DOTM extension rather than opening as new files (document 1, document 2, etc.). I thought they would open as .DOCX and that is what is desired. I am using Documents.Open with the filepath to open the various templates. Howver, the userform is opening the templates as if I am right clicking on the templates to edit the templates rather than as if I am double clicking on the templates to use them to create new documents (if that makes sense). If I double click the templates directly (rather than through the userform), the templates properly open as .DOCX files and as new documents (document 1, document 2). So, is there some additional code I need to put into the userform so the templates will open to create new documents from them correctly? Thanks for any help. |
#2
|
||||
|
||||
Why is the template being opened? You should be creating a new document from it (e.g. by double-clicking on the template or by selecting it via File>New).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
The templates are being opened from the Userform depending upon user answers - so you can't click on file etc. I found the answer myself- use Documents.Add instead of Documents.Open with .dotm files and it does open correctly -
|
#4
|
||||
|
||||
Precisely! Your code was opening the template for editing, not creating a new document from it.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 360: Opening .docx document | arjfca | Word | 2 | 08-22-2015 04:20 AM |
Opening Word /Excel reinstalls files, loses recent files | adj1 | Office | 3 | 05-10-2013 12:27 AM |
Docx files not opening with Office 2013 | IceWine | Word | 3 | 01-09-2013 05:26 PM |
How to convert docm to dotm without opening the file | Moz | Word | 1 | 12-20-2012 04:23 PM |
Opening .docx attachment | ADKREV | Word | 4 | 01-24-2011 02:58 AM |