Print Page | Close Window

Word Macro

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Using PDF reDirect
Forum Discription: Questions and Comments on using PDF reDirect Freeware and Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=154
Printed Date: 14 Nov 19 at 11:02PM


Topic: Word Macro
Posted By: Niel1952
Subject: Word Macro
Date Posted: 16 Jan 06 at 10:08AM

I'm not sure whther I should be posting this in the programming topic but I am posting it here for people who may not read that topic.

I suspect that there are people who need to regularly convert standard Word documents to pdfs.  The simplest way I have found is to have a macro, such as the one below added to the Word toolbar.  This macro will determine your current printer and, after converting the document to a pdf, revert the settings to that printer.  This macro will apply your default settings for Word and for PDF reDirect but you will still have to manually save the pdf document (and the Word document).

-------------------------------------------------------

Sub PDFreDirect()
'
' PDFreDirect Macro
' Macro created 16/01/2006 by Niel Ackermann
'
    strActivePrinter = ActivePrinter              'Checks for Active Printer
    ActivePrinter = "PDF reDirect v2"             'Changes Printer Driver to PDF reDirect v2
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
        PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
       
    ActivePrinter = strActivePrinter              'Restores Original Active Printer
End Sub

-------------------------------------------------------




Print Page | Close Window