Doug
Sat Dec 01 21:38:10 PST 2007
It would be a feature of PDF995 that you would need to modify.
--
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
"MIrving" <MIrving@discussions.microsoft.com> wrote in message
news:B7D42F34-61A5-4A17-A530-E7E956B5C1FE@microsoft.com...
> Thank you Doug.
>
> I came across a code on the internet for printing to Adobe Distiller. I
> was
> hoping I could modify it and use it with PDF995 instead of Adobe (I have
> confirmed that all users that would run the macro have PDF995 whereas it
> turns out less than half have Adobe Acrobat). I have cobbled together the
> following:
>
> Sub pdf()
> Dim PDFFileName As String
>
> 'Define the path and filename
> PDFFileName = ActiveDocument.Bookmarks("Filename").Range.Text
>
> ActivePrinter = "PDF995"
> SendKeys PDFFileName & "{ENTER}", False
> Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
> wdPrintDocumentContent, Copies:=1, Pages:="",
> PageType:=wdPrintAllPages, _
> Collate:=True, Background:=True, PrintToFile:=False
> End Sub
>
> When I run it, I'm still getting the print dialog box that asks for the
> File
> Name that it is to be saved as.
>
> Any guidance as to how I cab amend the code would be sincerely
> appreciated.
>
> "Doug Robbins - Word MVP" wrote:
>
>> See the article "Changing the selected (current) printer in Word without
>> changing the system default printer" at:
>>
>>
http://www.word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm
>>
>> The easiest way to deal with the filename would be to save the file with
>> the
>> name obtained by getting the .Range.Text of the bookmark, then do the
>> print
>> to Adobe PDF (in the properties for the Adobe PDF printer, you can turn
>> off
>> the request for a filename and it will then just use the name of the
>> document), then close the file and use the VBA Kill statement to delete
>> the
>> file that you saved with the bookmark name if necessary.
>>
>>
>> --
>> 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
>>
>> "MIrving" <MIrving@discussions.microsoft.com> wrote in message
>> news:13BC5FD6-C69C-4DE9-BBB0-0589E8C25C75@microsoft.com...
>> >I am using Word 97 and would like to write a macro that achieves the
>> > following in an active document:
>> >
>> > 1. Active document is printed in PDF format (usually this involves
>> > going
>> > to
>> > File -> Print -> Adobe PDFwriter)
>> >
>> > 2. When prompted to put in the filename for the PDF file, the filename
>> > is
>> > taken from a bookmark (named 'filename') in the active document.
>> >
>> > I would greatly appreciate any suggestions.
>>
>>
>>