<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBA code to save the file with another name in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8201212#M6433</link>
    <description>&lt;P&gt;There are a lot sample code you can find if you google the net for Excel automation. Here is some quick code off my head without actual test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Sub SaveNewDrawings()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fileNames as Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim folder As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; folder="C:\MyDrawings\"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; fileNames = GetFileNamesFromExcelSheet("C:\MyDrawings\MyFileList.xlsx")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Ubound(fileNames)&amp;lt;0 Then Exit Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; For i=0 to Ubound(fileNames)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ThisDrawing.SaveAs folder &amp;amp; fileNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Function GetFileNamesFromExcelSheet(sheehFile As String) As Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fNames() As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fName As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim xlsApp As Excel.Application&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim sheet As Worksheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim excelStarted As Boolean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Resume Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Set xlsApp=GetObject( , "Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Err.Number&amp;lt;&amp;gt;0 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Err.Clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set xlsApp=CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excelStarted = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Enhd If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Goto 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If xlsApp Is Nothing Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Cannot open Excel application!"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlsApp.Workbooks.Open sheetFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' Assume the active sheet is the sheet containing the data (A1 to A15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' otherwise you need to identify which sheet to read the data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;For i=0 to 14&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fName=CStr(ActiveSheet.Range("A" &amp;amp; i+1).Value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReDim Preserve fNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fNames(i)=fName&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If excelStarted then xlsApp.Quit&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; GetFileNamesFromExcelSheet=fNames&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the code is not tested. Just give you an idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Aug 2018 13:53:54 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2018-08-15T13:53:54Z</dc:date>
    <item>
      <title>VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8194918#M6429</link>
      <description>&lt;P&gt;Dear Folks...&lt;BR /&gt;I have a task to save the template drawing with 15 different&amp;nbsp;&lt;EM&gt;(for 15 each typical level of a tower).&lt;BR /&gt;&lt;/EM&gt;I am looking to have a code for that.&amp;nbsp;&lt;BR /&gt;Initial try was to start with excel.. but got struck there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help in this will be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Many Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 09:13:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8194918#M6429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-13T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8195475#M6430</link>
      <description>&lt;P&gt;This is AutoCAD VBA forum, I am not sure why you need to start with Excel to save AutoCAD drawing (as different drawing file name).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use AcadDocument.SaveAs() to save current drawing to a given file name. Say, you have a template opened in AutoCAD, and want to save it as "MyDwg01.dwg", "MyDwg02.dwg"... "MyDwg15.dwg", you can:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dim folder As String&lt;/P&gt;
&lt;P&gt;Dim i as Integer&lt;/P&gt;
&lt;P&gt;Dim fName As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;folder="C:\MyWork"&lt;/P&gt;
&lt;P&gt;For i = 1 To 15&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; fName="MyDwg" &amp;amp; Iif(i&amp;lt;10,"0" &amp;amp; i, i) &amp;amp; ".dwg"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ThisDrawing.SaveAs folder &amp;amp; "\" &amp;amp; fName&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note, after the For...loop, in the folder "C:\MyWork", you will see 15 drawing file saved, but in AutoCAD, only one drawing is open ("MyDwg15.dwg").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 13:26:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8195475#M6430</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-08-13T13:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8195575#M6431</link>
      <description>&lt;P&gt;Dear Yuan,&amp;nbsp;&lt;BR /&gt;Thanks for the immediate response. The reasons starting with excel is, I don't any knowledge of VBA coding in ACAD, its setup and syntax. Another reason is I have a list of drawing names in a column in excel.&lt;BR /&gt;I appreciate your approach stating that this is Autodesk Forum, I would like to ask, is there any way we can open excel from ACAD application and read the names in cell say B1:B10 and start saving the CAD Template with these names.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:07:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8195575#M6431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-13T14:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8197701#M6432</link>
      <description>&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;I tried writing the below code in VBA of AutoCAD and then i save the files as "Save As 01.dvb"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked like a charm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[Code]&lt;/P&gt;&lt;P&gt;Sub Save()&lt;BR /&gt;Dim folder As String&lt;BR /&gt;Dim i As Integer&lt;/P&gt;&lt;P&gt;Dim fName As String&lt;BR /&gt;folder = "C:\MyWork"&lt;BR /&gt;For i = 1 To 15&lt;BR /&gt;fName = "MyDwg" &amp;amp; IIf(i &amp;lt; 10, "0" &amp;amp; i, i) &amp;amp; ".dwg"&lt;BR /&gt;ThisDrawing.SaveAs folder &amp;amp; "\" &amp;amp; fName&lt;BR /&gt;Next&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;[/Code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please guide me through accessing the list from excel and saving these files with those names.&lt;/P&gt;&lt;P&gt;Many Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 09:11:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8197701#M6432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-14T09:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8201212#M6433</link>
      <description>&lt;P&gt;There are a lot sample code you can find if you google the net for Excel automation. Here is some quick code off my head without actual test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Sub SaveNewDrawings()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fileNames as Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim folder As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; folder="C:\MyDrawings\"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; fileNames = GetFileNamesFromExcelSheet("C:\MyDrawings\MyFileList.xlsx")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Ubound(fileNames)&amp;lt;0 Then Exit Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; For i=0 to Ubound(fileNames)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ThisDrawing.SaveAs folder &amp;amp; fileNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Function GetFileNamesFromExcelSheet(sheehFile As String) As Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fNames() As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fName As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim xlsApp As Excel.Application&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim sheet As Worksheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim excelStarted As Boolean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Resume Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Set xlsApp=GetObject( , "Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Err.Number&amp;lt;&amp;gt;0 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Err.Clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set xlsApp=CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excelStarted = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Enhd If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Goto 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If xlsApp Is Nothing Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Cannot open Excel application!"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlsApp.Workbooks.Open sheetFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' Assume the active sheet is the sheet containing the data (A1 to A15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' otherwise you need to identify which sheet to read the data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;For i=0 to 14&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fName=CStr(ActiveSheet.Range("A" &amp;amp; i+1).Value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReDim Preserve fNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fNames(i)=fName&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If excelStarted then xlsApp.Quit&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; GetFileNamesFromExcelSheet=fNames&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the code is not tested. Just give you an idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 13:53:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8201212#M6433</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2018-08-15T13:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8614468#M6434</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi, I just found this post and it's exactly what I've been trying to do. I've got a AutoCAD template and would like to save any number of copies based on a list of names in Excel. When I ran the untested code, I got the below error. My excel has no headers and the names are in A1:A5. I appreciate any help you can provide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.png" style="width: 762px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/606334iE00D962234A530A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.png" alt="error.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 14:41:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8614468#M6434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-22T14:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8614990#M6435</link>
      <description>&lt;P&gt;Luckily, I did claim my code was "off my head without actual test"&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the code runs in AutoCAD side, it will not automatically know what "ActiveSheet" is. So for the line of code that raises the error, change it to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;fName=CStr(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;xlaApp.&lt;/STRONG&gt;&lt;/FONT&gt;ActiveSheet.Range("A" &amp;amp; i+1).Value)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 17:39:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8614990#M6435</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2019-02-22T17:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8618848#M6436</link>
      <description>&lt;P&gt;I updated the code and it resolved the error I was having, but created a new error. Thanks for any help you can provide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error1.png" style="width: 796px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/607067i6A0C7873C29475F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="error1.png" alt="error1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 13:13:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8618848#M6436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-25T13:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622206#M6437</link>
      <description>&lt;P&gt;You misspelled xlsApp as xl&lt;FONT color="#FF0000"&gt;a&lt;/FONT&gt;App.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 15:29:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622206#M6437</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2019-02-26T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622226#M6438</link>
      <description>&lt;P&gt;I can't believe I missed that. It works now. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 15:34:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622226#M6438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T15:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622233#M6439</link>
      <description>&lt;P&gt;If you use Option Explicit at the beginning of your module's declaration section, vba will alert you when you type a variable name without first explicitly declaring it.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 15:38:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8622233#M6439</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2019-02-26T15:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: VBA code to save the file with another name</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8632595#M6440</link>
      <description>&lt;P&gt;Dear Yuan,&lt;BR /&gt;thanks for your codes and guidance. It has really helped a lot and saved a lot of time.&lt;/P&gt;
&lt;P&gt;Really appreciated.&lt;/P&gt;
&lt;P&gt;Thanks a ton&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers !!!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There are a lot sample code you can find if you google the net for Excel automation. Here is some quick code off my head without actual test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Sub SaveNewDrawings()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fileNames as Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim folder As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; folder="C:\MyDrawings\"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; fileNames = GetFileNamesFromExcelSheet("C:\MyDrawings\MyFileList.xlsx")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Ubound(fileNames)&amp;lt;0 Then Exit Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; For i=0 to Ubound(fileNames)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ThisDrawing.SaveAs folder &amp;amp; fileNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Function GetFileNamesFromExcelSheet(sheehFile As String) As Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fNames() As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fName As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim xlsApp As Excel.Application&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim sheet As Worksheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim excelStarted As Boolean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Resume Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Set xlsApp=GetObject( , "Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Err.Number&amp;lt;&amp;gt;0 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Err.Clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set xlsApp=CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excelStarted = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Enhd If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Goto 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If xlsApp Is Nothing Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Cannot open Excel application!"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlsApp.Workbooks.Open sheetFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' Assume the active sheet is the sheet containing the data (A1 to A15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' otherwise you need to identify which sheet to read the data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;For i=0 to 14&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fName=CStr(ActiveSheet.Range("A" &amp;amp; i+1).Value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReDim Preserve fNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fNames(i)=fName&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If excelStarted then xlsApp.Quit&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; GetFileNamesFromExcelSheet=fNames&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the code is not tested. Just give you an idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/543921"&gt;@norman.yuan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There are a lot sample code you can find if you google the net for Excel automation. Here is some quick code off my head without actual test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Public Sub SaveNewDrawings()&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fileNames as Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim folder As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; folder="C:\MyDrawings\"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; fileNames = GetFileNamesFromExcelSheet("C:\MyDrawings\MyFileList.xlsx")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Ubound(fileNames)&amp;lt;0 Then Exit Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; For i=0 to Ubound(fileNames)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ThisDrawing.SaveAs folder &amp;amp; fileNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Private Function GetFileNamesFromExcelSheet(sheehFile As String) As Variant&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fNames() As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim fName As String&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim i As Integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim xlsApp As Excel.Application&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim sheet As Worksheet&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Dim excelStarted As Boolean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Resume Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Set xlsApp=GetObject( , "Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If Err.Number&amp;lt;&amp;gt;0 Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Err.Clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set xlsApp=CreateObject("Excel.Application")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; excelStarted = True&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Enhd If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; On Error Goto 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If xlsApp Is Nothing Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox "Cannot open Excel application!"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlsApp.Workbooks.Open sheetFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' Assume the active sheet is the sheet containing the data (A1 to A15)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '' otherwise you need to identify which sheet to read the data&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;For i=0 to 14&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fName=CStr(ActiveSheet.Range("A" &amp;amp; i+1).Value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ReDim Preserve fNames(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fNames(i)=fName&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; End If&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; If excelStarted then xlsApp.Quit&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; GetFileNamesFromExcelSheet=fNames&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, the code is not tested. Just give you an idea.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 05:27:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vba-code-to-save-the-file-with-another-name/m-p/8632595#M6440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-03T05:27:24Z</dc:date>
    </item>
  </channel>
</rss>

