+ Reply to Thread
Results 1 to 2 of 2

Create a "XLTM" from a "XLSM" file.....HELP!

  1. #1
    Registered User
    Join Date
    03-03-2013
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    1

    Create a "XLTM" from a "XLSM" file.....HELP!

    After searching the internet with no luck I am posting this to those much smarter than me....

    I am working on a template file using Windows 7 and Excel2013. This template will be saved locally on several computers (eventually Ican see it being saved on SharePoint and used from there), but for now it will be local for multiple users.

    What I need is to replace the locally saved template file if the user makes a specific change to the “template1” file (meaning that they have double clicked the template and are working with the copy). This code will be initiated by the user clicking on a button on the specific sheet that they would be changing.

    I also need to do this in the background. Essentially what I am trying to do is mimic the user opening the template in “edit” mode and then saving their changes without them having to actually do this.
    By using “ActiveWorkbook.SaveCopyAs” I can create a copy with their changes, but I am stuck on how to change this “.xlsm” to an “.xltm”. I have tried to do a simple rename, but the file will error out when I try toopen the template.
    At the end of this I need to delete the temporary file that was created

    Below is the code that I have so far.

    Please Login or Register  to view this content.



    Thanks in advance for your help

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: Create a "XLTM" from a "XLSM" file.....HELP!

    I think you would need to use SaveAsCopy, open the newly copied file and then use SaveAs which will allow you to save to different file format.
    You can then Kill the SaveAsCopy of the file.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. Replies: 1
    Last Post: 05-23-2013, 02:04 PM
  4. MSoffice Outlook 2003 message to be saved in C dir with the file name "From" "Sent" "Sub"
    By shailendra0509 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:32 AM
  5. Replies: 2
    Last Post: 07-26-2010, 06:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1