![]() |
|
#4
|
||||
|
||||
|
Hi Joyce,
There's nothing in the code you posted that has anything to do with printing, per se. It's all about inserting one or two logos into the document header. If I've understood that code correctly, it could be simplified to: Code:
Sub FormatTheFile() Dim DocLogo As Document, DocMain As Document Set DocMain = ActiveDocument Set DocLogo = Documents.Open(FileName:=\\Lion\D$\CLIENTS\Authorization\LogoFile.doc, AddToRecentFiles:=False) FileName$ = GetFileType$() Select Case FileName$ Case "IPWSM", "IPWSP", "IOPWSM" DocLogo.Shapes("Picture 5").Copy With DocMain.Sections(1).Headers(wdHeaderFooterPrimary).Range .Collapse wdCollapseStart .Paste End With End Select DocLogo.Shapes("Picture 6").Copy With DocMain.Sections(1).Headers(wdHeaderFooterPrimary).Range .Collapse wdCollapseEnd .Paste End With DocLogo.Close SaveChanges:=False FileName$ = GetFileType$() Select Case FileName$ Case "OICPIA", "OICPOA" Call OICPIA Case "IPSDP", "OPINTM", "IOPWSM", "IPHWP", "IOPWSPM", "IOPHEM", "IOPHEPM", "IOPHWPM", "IOPHWM" Selection.EndKey Unit:=wdStory Case Else 'TEMP$ = MsgBox(FileName$ + ": UNKNOWN TYPE.", vbOKOnly, "Error") End Select End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to print "Current Page" in Word 2010
|
Jshopping | Word VBA | 10 | 06-08-2012 01:15 AM |
| Macro in word | khalfenadeem | Word | 1 | 04-11-2011 04:35 PM |
Help with Word macro please
|
Philcraig69 | Word VBA | 2 | 01-21-2011 04:19 PM |
| Word 2003 macro to Word 2007 to 2010 to... | maruapo | Word VBA | 0 | 06-04-2010 03:43 PM |
| Word macro | weezypenguin | Word | 0 | 02-25-2010 01:25 PM |