Global FilePath as String Global FileStuff as String Global FileName as String Global FrameWidth as Float Global FrameHeight as Float Global SaveFile as String Global LayerName as String Global i as Integer Global CurrentLayer as Layer Macro Update #Sets file variables. FileStuff= ActiveDoc.Path FileName = ActiveDoc.Name #Sets frame variables. FrameWidth = ActiveDoc.Window.PageX FrameHeight = ActiveDoc.Window.PageY #Revemoves bounding box. Unlock Select None select if pen is "No pen" Delete Selection #Saves file to source location. Save FileStuff #Clears variable. LayerName = "" #Creates new temp file. New Save "C:\Temp\Temp.iso" #Activates source window. ACTIVATE WINDOW FileName #Loops through each layer closing source file between each loop allowing for import layer function to run. #Sets values of variables. i = ActiveDoc.LayerCount CurrentLayer = ActiveDoc.Layers[i] #Starts loop that goes through all existing layers and adds each layer name to variable. While (i <> 0) CurrentLayer = ActiveDoc.Layers[i] LayerName = CurrentLayer.Name Close Confirm_No Import Layers FileStuff LayerName Open FileStuff i = i-1 End While #Closes source file. Close Confirm_No #Sets frame. ActiveDoc.Window.PageX = FrameWidth ActiveDoc.Window.PageY = FrameHeight #Enlarges frame to full screen. Zoom Page #Saves temp file over source file. Save FileStuff #Changes file to show it has not been modified. ActiveDoc.Modified = 0 End Macro