![]() |
|
#1
|
|||
|
|||
![]()
Hello Paul
I have now made my code literally a few lines as show at the end as all the rest is just localisation. But, it still fails on the 2nd save wiht run-time error 4198: command failed. I have to admit I am getting a bit frustrated now. What I am trying to do is save a .dotm word template as a .docx using the name that the user enters, but I just don't seem to be able to achieve it. At the moment the users have to press save as and select word document, but this seems beyond their very limited ability which is why I thought I would automate it. I also need to keep a .dotm version in case they need to make changes at a later date. myfilename = InputBox("Enter file name for document " & myfilename) MsgBox myfilename '(this is just for me to see what I have entered) ActiveDocument.SaveAs FileName:=myfilename, FileFormat:=wdFormatXMLTemplateMacroEnabled Application.DisplayAlerts = False ActiveDocument.SaveAs FileName:=myfilename, FileFormat:=wdFormatXMLDocument Application.DisplayAlerts = True |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
bennypryde | Office | 1 | 01-05-2012 03:33 PM |
![]() |
tinfanide | Excel Programming | 4 | 11-05-2011 01:40 AM |
Handling Excel Data | msofficeno475 | Excel | 1 | 01-17-2010 09:56 AM |
Runtime error 5487 - Word cannot complete the save to to file permission error | franferns | Word | 0 | 11-25-2009 05:35 AM |
Handling ICALENDAR attachments | l_kris06 | Outlook | 0 | 11-12-2008 07:22 AM |