• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Sending printer codes from Powerpoint slide

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.

  • 2
  • 2
1 Solution
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

Crh61663Author Commented:
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%

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

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.
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now