![]() |
|
#1
|
||||
|
||||
![]()
In that case, the SELECT FROM statement becomes:
SELECT [#] AS `FER`, `Year`, [InstrumentNo ] AS `Instrument No`, `Date`, `Terms`, `CCY`, Format([Amount],'#,0') AS `Amount` FROM And, for the switches use: \l "1" \b "16" \h As for the centering & header row formatting, add the following macro in your mailmerge main document to drive the process: Code:
Sub MailMergeToDoc() Application.ScreenUpdating = False Dim Tbl As Table ActiveDocument.MailMerge.Execute With ActiveDocument For Each Tbl In .Tables With Tbl .Range.ParagraphFormat.Alignment = wdAlignParagraphCenter .Rows.Alignment = wdAlignRowCenter .Rows(1).HeadingFormat = True .Rows(1).Range.Font.Bold = True .Rows(1).Range.Shading.BackgroundPatternColor = wdColorAqua End With Nexxt End With Set Tbl = Nothing Application.ScreenUpdating = True End Sub I haven't been able to match your exact shading using Word's presets. The full set of presets for blue shades of various kinds are: wdColorAqua, wdColorBlue, wdColorBlueGray, wdColorLightBlue, wdColorLightTurquoise, wdColorPaleBlue, wdColorSkyBlue, wdColorTeal, wdColorTurquoise Other than using one of those, you could use: Code:
.Rows(1).Range.Shading.BackgroundPatternColorIndex = Note: You will need to save your mailmerge main document in the .docm format. For PC macro installation & usage instructions, see: Installing Macros For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Generating a vertical classification list | AP41-at-OfficeFORUM | Excel | 11 | 01-27-2023 11:59 AM |
Batch generating word template with CC from excel data | Caerleon | Excel Programming | 1 | 11-15-2022 08:46 PM |
![]() |
myspoonistoobig | Mail Merge | 8 | 10-16-2015 12:03 AM |
Generating Fresh Copies Of an Excel Document | callumwk | Excel | 2 | 04-09-2012 06:13 AM |
![]() |
nsv | Outlook | 1 | 08-19-2010 03:48 AM |