Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2019, 01:24 PM
g_stuckey g_stuckey is offline Print or export a single section to PDF Windows 10 Print or export a single section to PDF Office 2016
Novice
Print or export a single section to PDF
 
Join Date: Feb 2019
Location: Alabama, USA
Posts: 2
g_stuckey is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 02-20-2019, 04:08 PM
Guessed's Avatar
Guessed Guessed is offline Print or export a single section to PDF Windows 10 Print or export a single section to PDF Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 02-21-2019, 05:55 AM
g_stuckey g_stuckey is offline Print or export a single section to PDF Windows 10 Print or export a single section to PDF Office 2016
Novice
Print or export a single section to PDF
 
Join Date: Feb 2019
Location: Alabama, USA
Posts: 2
g_stuckey is on a distinguished road
Default

Thank you very much!

G.
Reply With Quote
Reply

Tags
macro, pdf, word section



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
Print or export a single section to PDF Footnote numbering problem within single section jsswadley Word 2 03-17-2015 04:44 PM
Print or export a single section to PDF 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft