From: Vagabond on
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?
From: Doug Robbins - Word MVP on
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

"Vagabond" <Vagabond(a)discussions.microsoft.com> wrote in message
news:AA21FCD9-6EB5-46CB-89D0-AB14AE8A0D18(a)microsoft.com...
> 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?