![]() ![]() StrFile = Dir(strFolder & "\*.doc", vbNormal) Lastly, can I incorporate that into the existing code (which I currently have in Word VBA), or would I have to make a new one? Would it exist in Word, or would I have to put that one in Excel? I am very new to VBA and am trying to learn (I've been searching forums and even checked out a book at the library to help me understand/help me read the coding), so any help for this newbie is truly appreciated!ĭim strFolder As String, strFile As String, strDocNm As String, wdDoc As Document jpgs in a given folder, like the one above, and convert. PDF? I've done a lot of searching and I've found a couple (where the code inserts the picture into an excel doc and then saves it as PDF) but I need it to go in and find all the. In addition, how can I modify this code to convert. However, sometimes it doesn't convert the first. ChangeFileOpenDirectory "U:\Documents\File Conversion Test"ĪctiveDocument.Save 'Save active docĪctiveDocument.Close 'Close active docĪpplication.ScreenUpdating = True BitmapMissingFonts:=True, UseISO19005_1:=False CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _ ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ ActiveDocument.ExportAsFixedFormat OutputFileName:= _ Path = "U:\Documents\File Conversion Test"įile = Dir(path & "*.doc") 'Dir means directoryĭo While file "" ' means not equal, so this says if the file name isn't blankĭocuments.Open FileName:=path & file 'Open files that are located in this directory, ending in. Application.ScreenUpdating = Falseĭim path As String ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |