Board logo

標題: [發問] 打印問題 [打印本頁]

作者: jomeow    時間: 2018-2-6 16:09     標題: 打印問題

請問一下.. 我已設好了一個工作表1的打印設定..
請問我可不可以把工作表1的打印設定.. 復製到工作表2呢

先謝謝各位大大幫忙!!
作者: ikboy    時間: 2018-2-7 14:27

先點選已設好的工作表1, 表住Ctrl點選其他工作表(可以多個工作表), 輸入指令:
Alt+P,sp,Enter, 完成.
作者: jomeow    時間: 2018-2-7 16:22

回復 2# ikboy


    謝謝你呀... 我成功了.. 可以復制到第二張工作表..

問多一條題.. 如果是想由 file A的工作表打印格式, 復製到FILE B的工作表..

可以嗎?

因為每月都會由供應商給我一次.. 內容大致一樣,

我要每次都要重新設定打印設定..

謝謝各位大大再次幫忙!!
作者: ikboy    時間: 2018-2-8 14:31

try this:
  1. Sub zz()
  2. Application.PrintCommunication = False
  3. With ActiveSheet.PageSetup
  4. .AlignMarginsHeaderFooter = ThisWorkbook.Sheets(1).PageSetup.AlignMarginsHeaderFooter
  5. .BlackAndWhite = ThisWorkbook.Sheets(1).PageSetup.BlackAndWhite
  6. .BottomMargin = ThisWorkbook.Sheets(1).PageSetup.BottomMargin
  7. .CenterFooter = ThisWorkbook.Sheets(1).PageSetup.CenterFooter
  8. .CenterHeader = ThisWorkbook.Sheets(1).PageSetup.CenterHeader
  9. .CenterHorizontally = ThisWorkbook.Sheets(1).PageSetup.CenterHorizontally
  10. .CenterVertically = ThisWorkbook.Sheets(1).PageSetup.CenterVertically
  11. .DifferentFirstPageHeaderFooter = ThisWorkbook.Sheets(1).PageSetup.DifferentFirstPageHeaderFooter
  12. .Draft = ThisWorkbook.Sheets(1).PageSetup.Draft
  13. .EvenPage.CenterFooter.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.CenterFooter.Text
  14. .EvenPage.CenterHeader.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.CenterHeader.Text
  15. .EvenPage.LeftFooter.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.LeftFooter.Text
  16. .EvenPage.LeftHeader.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.LeftHeader.Text
  17. .EvenPage.RightFooter.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.RightFooter.Text
  18. .EvenPage.RightHeader.Text = ThisWorkbook.Sheets(1).PageSetup.EvenPage.RightHeader.Text
  19. .FirstPage.CenterFooter.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.CenterFooter.Text
  20. .FirstPage.CenterHeader.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.CenterHeader.Text
  21. .FirstPage.LeftFooter.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.LeftFooter.Text
  22. .FirstPage.LeftHeader.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.LeftHeader.Text
  23. .FirstPage.RightFooter.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.RightFooter.Text
  24. .FirstPage.RightHeader.Text = ThisWorkbook.Sheets(1).PageSetup.FirstPage.RightHeader.Text
  25. .FirstPageNumber = ThisWorkbook.Sheets(1).PageSetup.FirstPageNumber
  26. .FitToPagesTall = ThisWorkbook.Sheets(1).PageSetup.FitToPagesTall
  27. .FitToPagesWide = ThisWorkbook.Sheets(1).PageSetup.FitToPagesWide
  28. .FooterMargin = ThisWorkbook.Sheets(1).PageSetup.FooterMargin
  29. .HeaderMargin = ThisWorkbook.Sheets(1).PageSetup.HeaderMargin
  30. .LeftFooter = ThisWorkbook.Sheets(1).PageSetup.LeftFooter
  31. .LeftHeader = ThisWorkbook.Sheets(1).PageSetup.LeftHeader
  32. .LeftMargin = ThisWorkbook.Sheets(1).PageSetup.LeftMargin
  33. .OddAndEvenPagesHeaderFooter = ThisWorkbook.Sheets(1).PageSetup.OddAndEvenPagesHeaderFooter
  34. .Order = ThisWorkbook.Sheets(1).PageSetup.Order
  35. .Orientation = ThisWorkbook.Sheets(1).PageSetup.Orientation
  36. .PrintArea = ThisWorkbook.Sheets(1).PageSetup.PrintArea
  37. .PaperSize = ThisWorkbook.Sheets(1).PageSetup.PaperSize
  38. .PrintComments = ThisWorkbook.Sheets(1).PageSetup.PrintComments
  39. .PrintErrors = ThisWorkbook.Sheets(1).PageSetup.PrintErrors
  40. .PrintGridlines = ThisWorkbook.Sheets(1).PageSetup.PrintGridlines
  41. .PrintHeadings = ThisWorkbook.Sheets(1).PageSetup.PrintHeadings
  42. .PrintTitleColumns = ThisWorkbook.Sheets(1).PageSetup.PrintTitleColumns
  43. .PrintTitleRows = ThisWorkbook.Sheets(1).PageSetup.PrintTitleRows
  44. .RightFooter = ThisWorkbook.Sheets(1).PageSetup.RightFooter
  45. .RightHeader = ThisWorkbook.Sheets(1).PageSetup.RightHeader
  46. .RightMargin = ThisWorkbook.Sheets(1).PageSetup.RightMargin
  47. .ScaleWithDocHeaderFooter = ThisWorkbook.Sheets(1).PageSetup.ScaleWithDocHeaderFooter
  48. .TopMargin = ThisWorkbook.Sheets(1).PageSetup.TopMargin
  49. If ThisWorkbook.Sheets(1).PageSetup.Zoom Then .Zoom = ThisWorkbook.Sheets(1).PageSetup.Zoom
  50. End With
  51. Application.PrintCommunication = True
  52. End Sub
複製代碼





歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)