gpt4 book ai didi

excel - 从 Excel vba 将“适合”设置为“在 Pdf 中可见”

转载 作者:行者123 更新时间:2023-12-02 05:06:11 26 4
gpt4 key购买 nike

我正在尝试将 Excel 工作表导出为 pdf。有什么方法可以使用 VBA 将 pdf 属性设置为适合可见。谢谢

下面是我正在使用的代码片段

With wksSalesAndQuotaScoreCard
'.PageSetup.LeftMargin=Application.InchesToPoints(0.7)
.PageSetup.LeftMargin = Application.InchesToPoints(0.7)
.PageSetup.RightMargin = Application.InchesToPoints(0.7)
.PageSetup.TopMargin = Application.InchesToPoints(0.75)
.PageSetup.BottomMargin = Application.InchesToPoints(0.75)
.PageSetup.HeaderMargin = Application.InchesToPoints(0.3)

.PageSetup.Orientation = xlLandscape
.PageSetup.PrintTitleRows = "_SalesandQuotaScoreCardView"
.PageSetup.CenterHorizontally = True
.PageSetup.Order = xlDownThenOver
.PageSetup.FitToPagesWide = 1
''.PageSetup.Zoom = 50
Set rngSalesAndQuotaView = Range(.Shapes("_SalesandQuotaViewFrame").TopLeftCell.Offset(0, -1), .Shapes("_SalesandQuotaViewFrame").BottomRightCell.Offset(1, 0))
rngSalesAndQuotaView.Select
End With

wksScoreCardPayoutView.Select
wksSalesAndQuotaScoreCard.Select False
Selection.ExportAsFixedFormat xlTypePDF, IncludeDocProperties:=True, openafterpublish:=True
wksCustomizeScoreCard.Activate

最佳答案

Adobe 有一组打开文档时可以使用的代码:

http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

请注意,这些命令仅适用于经过批准的 Adob​​e Reader,并非所有 PDF 阅读器都会接受这些命令。

您可能需要使用 Acrobat 手动设置条件 per this answer on the Adobe Help Forums :

Regarding the OP: "How can I set the default to open all PDF's at 100% zoom magnification?"

With Acrobat Pro, run a Batch Process (Sequence)/Action to run the "Open Options" sequence. This sequence permits setting the values for all items under the Initial View tab of PDFs' Document Properties.

Regarding a PDF's Document Properties > Initial View: Visit an open PDF's Document Properties (Ctrl+D, Cmd+D). Go to the Initial View tab. The top pane (Layout and Magnification) permits configuration of:

Navigation tab: Page Only | Bookmarks Panel and Page | Pages Panel and Page | Attachments Panel and Page | Layers Panel and Page Page Layout: Default | Single Page | Single Page Continuous | Two-Up (Facing) | Two-Up (Cover Page) | Two-Up Continuous (Cover Page) Magnification: Default | Actual Size | Fit Page | Fit Width | Fit Height | Fit Visible | Magnification percentages (25% to 6400%)

Configuration settings other than "Default" dictate how the PDF is viewed initially.

The settings for all values in all panes in the Initial View may be established for one or many PDFs by use of a Batch Sequence/Action (Acrobat Pro required).

This functionality is utilized in an enterprise environment where large document collections are deployed in a LAN/WAN "eLibrary" to provide a consistent initial view to end-users.

It also provides a content author a mechanism for establishing the initial view for their deployed content (such as PDF document collections distributed on optical storage media).

As to the typical default Initial View for a created PDF: When a PDF is created via Acrobat the PDF document's default Initial View for Layout and Magnification is: --| Navigation: Page Only --| Page layout: Default --| Magnification: Default --| Open to page: 1

Regarding the Open Parameters document — While this document does provide a few command line options the document's primary focus is the use of a URL to open a URL's targeted PDF's initially opening.

Worth noting is that the document is specific for URLs and not applicable to UNC links (links with a LAN/WAN).

关于excel - 从 Excel vba 将“适合”设置为“在 Pdf 中可见”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40219676/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com