#1
|
|||
|
|||
Print or export a single section to PDF
Hi All,
I'm Ginger, a technical writer using Word 2016/365. I'm just learning VBA but I have an urgent request from my customer to print, save, or export a specific section to PDF on a button click. I'm not there yet. I've done some research and found pieces of information that I only understand partially (because, seriously, I'm just starting out) so I know it can be done. I just need some help. I found the following but it is for Word 2003. I tried it but it didn't work: With Dialogs(wdDialogFilePrint) .Background = True .Pages = "s1" .Execute End With I understand that it doesn't solve the straight to PDF issue but users can choose PDF. Ideally, users can click a button above the section break to convert to PDF and open the Save dialog box. Sorry to be a pain as a noob. Ginger |
#2
|
||||
|
||||
Ginger
You should be using a different command ActiveDocument.ExportAsFixedFormat is the command you should be using. You can provide parameters such as exportformat and range Refer to https://docs.microsoft.com/en-us/off...%3D-2147217396
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thank you very much!
G. |
Tags |
macro, pdf, word section |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to print on a single sheet | xexeu | Excel | 0 | 10-09-2018 01:57 PM |
Export single category from contacts list | ksimmonds | Outlook | 0 | 04-25-2018 02:04 AM |
Footnote numbering problem within single section | jsswadley | Word | 2 | 03-17-2015 04:44 PM |
Outlook export to a calendar csv file is transposing single digit starting dates | sala-marie | Excel | 3 | 10-27-2013 09:32 PM |
Export data from multiple attachments into a single excel document | Woolstar | Outlook | 0 | 12-07-2011 09:49 AM |