Sending printer codes from Powerpoint slide

Posted on 2011-10-14
Last Modified: 2012-06-27
How would I send the set up codes to an Okidata CX2033MFP?
We have to go into "Proterties"
       Under the "Layout " tab      
 select "Rotated Landscape"
       Under the "Paper/Quality" tab
 select the "Advanced" button
       Under the "Paper Size:"
select the "PostScript Custom Page Size", which brings up "Custom Page Size Definition"
      then under "Width:" have to enter a number
              under "Height:" have to enter a number
clock "OK" th leave that screen
   set the background traansparency on the slide to 100%
then enter an amount to print.

Is there a VBA way to set this up for each slide used? That way everything would be set except for the amount to print.

Question by:Crh61663
    LVL 11

    Expert Comment

    I'm not clear what your asking here.

    It seems like your dealing with powerpoint slides.  In which case the best option is to create a Template.  If you edit your master template then you don't have to edit each slide individually.  

    If this is Excel and I'm just misunderstanding the question, then the easiest way to get the exact code you want is to record a macro and look at what it generates.

    In order to help you properly we need to know what version of Excel your using as their are differences in the VBA.

    My own experiance is that the code block below can be reduced to only change from default the values you want changed.

    I'm sorry I can't be more helpful, but I'm not sure I'm understanding the question fully.

    Here is what I got:
    Sub Macro1()
    ' Macro1 Macro
    ' test
    ' Keyboard Shortcut: Ctrl+t
        Application.PrintCommunication = False
        With ActiveSheet.PageSetup
            .PrintTitleRows = ""
            .PrintTitleColumns = ""
        End With
        Application.PrintCommunication = True
        ActiveSheet.PageSetup.PrintArea = ""
        Application.PrintCommunication = False
        With ActiveSheet.PageSetup
            .LeftHeader = ""
            .CenterHeader = ""
            .RightHeader = ""
            .LeftFooter = ""
            .CenterFooter = ""
            .RightFooter = ""
            .LeftMargin = Application.InchesToPoints(0.7)
            .RightMargin = Application.InchesToPoints(0.7)
            .TopMargin = Application.InchesToPoints(0.75)
            .BottomMargin = Application.InchesToPoints(0.75)
            .HeaderMargin = Application.InchesToPoints(0.3)
            .FooterMargin = Application.InchesToPoints(0.3)
            .PrintHeadings = False
            .PrintGridlines = False
            .PrintComments = xlPrintNoComments
            .PrintQuality = 600
            .CenterHorizontally = False
            .CenterVertically = False
            .Orientation = xlLandscape
            .Draft = False
            .PaperSize = xlPaperLetter
            .FirstPageNumber = xlAutomatic
            .Order = xlDownThenOver
            .BlackAndWhite = False
            .Zoom = 100
            .PrintErrors = xlPrintErrorsDisplayed
            .OddAndEvenPagesHeaderFooter = False
            .DifferentFirstPageHeaderFooter = False
            .ScaleWithDocHeaderFooter = True
            .AlignMarginsHeaderFooter = True
            .EvenPage.LeftHeader.Text = ""
            .EvenPage.CenterHeader.Text = ""
            .EvenPage.RightHeader.Text = ""
            .EvenPage.LeftFooter.Text = ""
            .EvenPage.CenterFooter.Text = ""
            .EvenPage.RightFooter.Text = ""
            .FirstPage.LeftHeader.Text = ""
            .FirstPage.CenterHeader.Text = ""
            .FirstPage.RightHeader.Text = ""
            .FirstPage.LeftFooter.Text = ""
            .FirstPage.CenterFooter.Text = ""
            .FirstPage.RightFooter.Text = ""
        End With
        Application.PrintCommunication = True
    End Sub


    Author Comment

    I tried the code you sent, but it hangs up at the first command "Application.PrintCommunication = False"
    We use ppt because we can set up a background from a scanned copy of our label, then position the data we want to print in the blank space on the label. We also have a batch number that we add to the label to indicate the month made followed by a year code "E" then a 5 digit batch number. We are usually printing 10-200 labels for this batch. We may also have some one-gallon labels to print for this same batch. We have a different slide that has a gallon size background set up. To keep from printing the background colors with the description and batch number we set the transparency to 100%


    Author Comment

    Here is a gallon label template. We are using Office 2007. I also illustrated some of the steps before printing.
    LVL 11

    Accepted Solution


    I've taken a close look at what you sent, and I have the following comments:

    It appears that what you are doing is all or almost all part of the printer driver instead of part of MS Office.  

    Here is what I would recommend.  I would go to your printer that you use via Devices & Printers

    You may need your IT team to help you with this:
    1)Copy the printer with a new name such as "Label Printing"
    2)On this new printer go into the PRINTER properties.  These also have a properties, but you want to edit the printer properties.  
    3)Go through all the steps you need to in order to get it to print properly.  Save these settings.  
    4)Whenever you are printing labels use this new printer and all those steps you outlined will already have been completed in your printer properties.  

    That is the simplest way to accomplish what you are trying to do if I'm understanding your question properly.  

    Best of luck!  

    -Script Addict.
    LVL 50

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now