![]() |
#1
|
|||
|
|||
![]()
I need a repeating macro that could do the following in a specified folder:
1. Change all Fonts to Times New Roman 2. All font size to 12 3. Then have the first line of text to have a Style of Heading 1 4. Save the file as .doc Then possibly have it call another macro to have it do a Save As .docx Here is the macro I have now. Sub PageTxtFontHeader1() ' ' PageTxtFontHeader1 Macro ' ' With Selection.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = InchesToPoints(0.6) .BottomMargin = InchesToPoints(0.6) .LeftMargin = InchesToPoints(0.6) .RightMargin = InchesToPoints(0.6) .Gutter = InchesToPoints(0) .HeaderDistance = InchesToPoints(0.5) .FooterDistance = InchesToPoints(0.5) .PageWidth = InchesToPoints(8.5) .PageHeight = InchesToPoints(11) .FirstPageTray = wdPrinterDefaultBin .OtherPagesTray = wdPrinterDefaultBin .SectionStart = wdSectionNewPage .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = False .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = False .MirrorMargins = False .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft End With Selection.WholeStory Selection.Font.Name = "Times New Roman" Selection.Font.Size = 12 Selection.MoveDown Unit:=wdLine, Count:=1 Selection.HomeKey Unit:=wdStory Selection.Style = ActiveDocument.Styles("Heading 1") End Sub How can I get this to repeat on all of the files in that folder? Last edited by WH7262; 08-26-2014 at 08:37 AM. Reason: Giving more details |
#2
|
||||
|
||||
![]()
Cross-posted and answered at: http://answers.microsoft.com/en-us/o...50c2#LastReply
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184 See also: http://windowssecrets.com/forums/sho...l=1#post960703 PS: When posting code, please post formatted code and use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
format style, loop, repeating |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Sandy27 | Word | 9 | 01-03-2014 01:51 PM |
Unable to change font size | Andoheb | Outlook | 1 | 11-23-2012 07:24 PM |
![]() |
kkepo | Word | 4 | 08-28-2012 08:53 PM |
![]() |
markg2 | Outlook | 2 | 06-09-2010 03:23 PM |
Can't change font type or size | sideways | Word | 2 | 11-01-2009 09:57 AM |