Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2016, 09:23 AM
mktate mktate is offline .DOTM files not opening as .DOCX with userform Windows 10 .DOTM files not opening as .DOCX with userform Office 2010 64bit
Novice
.DOTM files not opening as .DOCX with userform
 
Join Date: Dec 2015
Posts: 26
mktate is on a distinguished road
Default .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.
Reply With Quote
  #2  
Old 02-25-2016, 03:02 PM
macropod's Avatar
macropod macropod is offline .DOTM files not opening as .DOCX with userform Windows 7 64bit .DOTM files not opening as .DOCX with userform Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 02-26-2016, 07:07 AM
mktate mktate is offline .DOTM files not opening as .DOCX with userform Windows 10 .DOTM files not opening as .DOCX with userform Office 2010 64bit
Novice
.DOTM files not opening as .DOCX with userform
 
Join Date: Dec 2015
Posts: 26
mktate is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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).
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 -
Reply With Quote
  #4  
Old 02-26-2016, 02:17 PM
macropod's Avatar
macropod macropod is offline .DOTM files not opening as .DOCX with userform Windows 7 64bit .DOTM files not opening as .DOCX with userform Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mktate View Post
I found the answer myself- use Documents.Add instead of Documents.Open with .dotm files and it does open correctly -
Precisely! Your code was opening the template for editing, not creating a new document from it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 360: Opening .docx document arjfca Word 2 08-22-2015 04:20 AM
.DOTM files not opening as .DOCX with userform Opening Word /Excel reinstalls files, loses recent files adj1 Office 3 05-10-2013 12:27 AM
.DOTM files not opening as .DOCX with userform Docx files not opening with Office 2013 IceWine Word 3 01-09-2013 05:26 PM
.DOTM files not opening as .DOCX with userform How to convert docm to dotm without opening the file Moz Word 1 12-20-2012 04:23 PM
.DOTM files not opening as .DOCX with userform Opening .docx attachment ADKREV Word 4 01-24-2011 02:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft