Tag: autosave

运行循环时自动保存文件

我有一个很长的本地网页的列表,这是由Excel 2013中的一个macrosparsing。我想知道是否有任何方法来自动保存文件每5分钟左右循环这些文件(> 9000本地.HTM文件)。 这里是一些代码: Sub ImportFromWebPages() 'declare here some global variables For startnumber = 1 to 9126 'parse the .HTM files and extract the needed data 'while running this loop (which will take some days to finish) 'Excel should save the file every 5 or 10 minutes. Next startnumber End Sub 对此有何想法?

VBA打印到PDF并使用自动文件名保存

我有一个代码,打印工作表中的选定区域为PDF并允许用户select文件夹和input文件名。 有两件事我想要做: 有没有办法使PDF文件可以在用户桌面上创build一个文件夹,并根据表格中特定的单元格保存文件名? 如果同一页的多个副本保存/打印为PDF,则每个副本都可以有一个数字,例如。 2,3在文件名的基础上拷贝数?** 这是我到目前为止的代码: Sub PrintRentalForm() Dim filename As String Worksheets("Rental").Activate filename = Application.GetSaveAsFilename(InitialFileName:="", _ FileFilter:="PDF Files (*.pdf), *.pdf", _ Title:="Select Path and Filename to save") If filename <> "False" Then With ActiveWorkbook .Worksheets("Rental").Range("A1:N24").ExportAsFixedFormat Type:=xlTypePDF, _ filename:=filename, _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=True End With End If filename = Application.GetSaveAsFilename(InitialFileName:="", _ […]