Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2010, 02:05 AM
zippyaus zippyaus is offline Macro to determine attached template Windows XP Macro to determine attached template Office 2003
Novice
Macro to determine attached template
 
Join Date: Mar 2010
Posts: 1
zippyaus is on a distinguished road
Default Macro to determine attached template

Hi



N00b question.

I am trying to create a print macro that will determine what template the document is attached to and based on that print single sided or duplex.

In plain text

If document template is C:\Program Files\Microsoft Office\Templates\Label.dot print single sided else
if document template is C:\Program Files\Microsoft Office\Templates\Letter.dot print duplex

I have go the printing part sorted

Code:
Sub PrintDuplex()

    Dim iDuplex As Long

    iDuplex = GetDuplex     'save the current setting
    SetDuplex 3             'set for vertical binding
    ActiveDocument.PrintOut Background:=False
    SetDuplex iDuplex       'restore the original setting

End Sub

Sub PrintSimplex()

    Dim iDuplex As Long

    iDuplex = GetDuplex     'save the current setting
    SetDuplex 1             'set for vertical binding
    ActiveDocument.PrintOut Background:=False
    SetDuplex iDuplex       'restore the original setting

End Sub
Is it possible to determine the template path via a macro call?

Any help would be greatly appreciated
Reply With Quote
Reply

Tags
duplex, printing, template

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine a user's mailbox size limit? enviroko Outlook 3 05-13-2010 07:02 AM
Anyway to determine time/date of text creation? pureride Word 1 01-05-2010 02:09 PM
Problem with MS Outlook when open email with attached file moniros Outlook 0 03-01-2009 12:50 AM
Outlook xp slow when Browsing to attached a file jmelgar1 Outlook 0 09-23-2008 01:49 PM
Macro to determine attached template Determine age by using birthdate gdodson Excel 1 08-11-2006 09:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:11 AM.


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