ExportAsFixedFormat with page selection

V

Vagabond

I am using the ExportAsFixedFormat function in Word VBA and I need to select
the pages of the Word document to pdf, as the whole document is never printed
out. The document is 43 pages of on-site risk assessment sheets and I have
successfully written a macro that will produce the string to insert the
various page numbers for sending to print, but I can't see how to apply that
to the ExportAsFixedPormat function.

Any ideas anyone?
 
D

Doug Robbins - Word MVP

Use something like

Dim prange As Range
With ActiveDocument
.GoTo wdGoToPage, #
Set prange = .Bookmarks("\page").Range
prange.ExportAsFixedFormat 'etc.

# is the number of the page that you want to export. If you have the
numbers of the pages in an array, you could iterate through that array. To
get the list of numbers, you may want to make use of the information in the
article at:

http://gregmaxey.mvps.org/Extract_Number_Index_From_String_Input.htm

Or, print to a .pdf printer. If you do not have one via the full version of
Adobe, there are free ones such as Primo PDF that work just as well for that
purpose.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top