Sending printer codes from Powerpoint slide

Posted on 2011-10-14
Medium Priority
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
  • 2
  • 2
LVL 11

Expert Comment

ID: 36971305
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

ID: 36971517
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

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

Accepted Solution

ScriptAddict earned 2000 total points
ID: 36979810

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
ID: 37419363
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

807 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