#1
|
|||
|
|||
Save a range of pages as PDF/New Word file with SaveAs Dialog box popup
Hello Everyone,
I am looking for a VBA code which will help me to save a range of pages as PDF and separate new word document with Save As dialog popup. Thanks in advance |
#2
|
||||
|
||||
You need to be more specific about what you are trying to do, but reading between the lines, are you trying to split a mail merged document to PDF? In which case see https://www.gmayor.com/MergeAndSplit.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thanks for your response gmayor...
I intended to convert part of word document file (Specified Page Range) in PDF Format. And I succeeded using below mentioned code. Sub SavePageRangeasPDF() ' ' SavePageRangeasPDF Macro ' ActiveDocument.ExportAsFixedFormat _ OutputFileName:=CurrentFolder & "Hello All" & ".pdf", _ ExportFormat:=wdExportFormatPDF, _ Range:=wdExportFromTo, From:=2, To:=11 End Sub In this similar way I want to save a duplicate copy of a word file (Specified Page Range) in docx format with SaveAs Dialogue box pop up to change the file name. Please help me in generating a code for this |
#4
|
||||
|
||||
Word doesn't offer that ability.
There are no 'pages' in a Word document. Documents comprise various story ranges with text flowed between the margins. It is not a page layout application. PDF creation is essentially a print process, for which Word does offer that facility. A possible approach would be to delete the unwanted pages then save with a new name, but beware. What Word considers a 'page' is somewhat flexible and will change as you delete other parts.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save pages range as PDF by input box | RobertDany | Word VBA | 4 | 08-14-2021 01:25 AM |
save dialog box promt doesn't save file | brmveen | Word VBA | 2 | 11-04-2015 12:51 AM |
Save a range of pages as PDF | gn4619 | Word VBA | 9 | 10-27-2015 02:11 PM |
How to suppress saveas dialog from VB6 | steveneashcraft | Word VBA | 15 | 05-09-2014 07:01 AM |
How to deactivate File Save dialog box | KIM SOLIS | Word | 3 | 12-15-2013 12:30 PM |