#1
|
|||
|
|||
Run Macro for DOC files in different folders
Hello!
I´m looking for a Macro who can make the following: 1.- Open DOC files (version 2010) in different folders under the same level For example: \folder A\ \subfolder_1\doc1.doc \subfolder_2\doc2.doc \subfolder_3\doc3.doc \subfolder_4\doc4.doc 2.- Run a macro that it changes the font size from 8pt to 11pt for all of them 3.- After that, create a PDF for all DOC files Would that be possible? |
#2
|
||||
|
||||
See, for example: https://www.msofficeforums.com/word-...tml#post125011
The code there doesn't do the font changes & pdf creation you want, but it does show how to loop through all files in a nested series of folders. It's also not clear from your post whether you want a single PDF for all files in the folder, or a separate PDF for each file: the latter is easy; the former could get complicated if different page layouts have been used.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Great, I will look into this thread and will see how the macro works for nested series of folders.
Sorry for being unclear. I want a separate PDF for each file. |
#4
|
||||
|
||||
For PDF creation, you'd uncomment the line:
Code:
'.SaveAs2 FileName:=Split(.Fullname, ".doc")(0) & ".pdf", FileFormat:=wdFormatPDF, AddToRecentFiles:=False Code:
Call RefreshFields(wdDoc) Code:
.Range.Font.Size = 11 Code:
.Close SaveChanges:=True Code:
.Close SaveChanges:=False
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Re-importing files, folders into Outlook 2010 | bugmeso | Outlook | 1 | 02-04-2018 10:59 AM |
Searching through folders/ subfolders and rename files if certain condition is met | mihnea96 | Excel | 1 | 05-15-2017 07:09 AM |
show folders and files in listbox | megatronixs | Outlook | 0 | 10-26-2014 06:41 AM |
list folders and files using .vbs file | josianne | Excel Programming | 3 | 08-18-2014 03:03 PM |
copy, sync files across 2 folders 1 pc | spgprivate | Office | 0 | 06-20-2013 08:41 AM |