如何打印一系列页面?

How can I print a range of pages?

如何打印一系列页面?我认为我正在按照文档中的说明进行操作。

这是代码。

Sub Imprimir()
    MsgBox "Current Printer: " & ActivePrinter
    'It works:
    ' Print current page
    ActiveDocument.PrintOut Background:=False, Range:=wdPrintCurrentPage, PrintToFile:=False
    ' Print all the document.
    'ActiveDocument.PrintOut Background:=False
    
    'It does not work
    ' print a range of pages
    ' ActiveDocument.PrintOut Background:=False, Range:=wdPrintRangeOfPages, Pages:="2-3"
    ' ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, From:="2", To:="3"
    
End Sub

尝试以下方法:

ActiveDocument.PrintOut Background:=False, Range:=wdPrintFromTo, From:="p2s3", To:="p3s2"

参见 part of my page on Sections 关于此的内容。

这是我最后做的结果https://github.com/davidbuenov/CombinarCorrespondencia