Windows XP Macro help

Me__2001

Internet Junkie
Joined
Apr 5, 2004
Messages
4,354
Reaction score
1
i'll try and explain this, my sister is making a powerpoint presentation for her uni course and she wants a link in it to open a worksheet with just a print button so the kids cant go wrong, so i've linked it to a standalone powerpoint presentation (you know the sort you get in an email that cant be edited) with a button that runs a macro to print the slide and a button to exit

this is the code for the print macro

Code:
 [/color]
 Sub Macro1()
  With ActivePresentation.PrintOptions
          .RangeType = ppPrintAll
          .NumberOfCopies = 1
          .Collate = msoTrue
          .OutputType = ppPrintOutputSlides
          .PrintHiddenSlides = msoTrue
          .PrintColorType = ppPrintColor
          .FitToPage = msoFalse
          .FrameSlides = msoFalse
          [b].ActivePrinter = "Canon i865"[/b]
      End With
      ActivePresentation.PrintOut
  End Sub[color=Red]


the problem is the bold bit, that is my printer i need it so the macro will work on any PC with what ever printer it has, anyone know how i can do that or can i just remove that line? and how do i make it so the buttons dont get printed ?
 
Last edited:
ok well i have taken out the active printer line and it still appears to be working :D, now i have another question, anyone know how to make one to exit the show??
 
ok, i've sorted the hiding the butoon thing, kinda cheated by adding a second slide without the buttons and hid it so the macro now prints the second slide
 
... keep it up, the men in white coats are on there way

Don't look at me ... but I'm not the only one who talks to themselves then.

:D
 
muckshifter said:
Don't look at me ... but I'm not the only one who talks to themselves then.

:D

just trying to keep people informed of how i'm doing

last update, its done
Dance.gif


if anyone wants the code its here

Print, if you want a range change the bold numbers to suit, if its one page then make the numbers the same as the page number like they are now

Code:
Sub Print()
         With ActivePresentation.PrintOptions
              .RangeType = ppPrintSlideRange
              With .Ranges
              .ClearAll
                          .Add Start:=[b]2[/b], End:=[b]2[/b]
         End With
                 .NumberOfCopies = 1
                 .Collate = msoTrue
                 .OutputType = ppPrintOutputSlides
                 .PrintHiddenSlides = msoTrue
                 .PrintColorType = ppPrintColor
                 .FitToPage = msoFalse 
                 .FrameSlides = msoFalse
         End With
          ActivePresentation.PrintOut
     End Sub[/color][color=Red]


Exit Slideshow

Code:
Sub Exit()
          SlideShowWindows(Index:=1).View.Exit
     End Sub[/color][color=Red]



Edit: the damn formatting isn't working
Edit:
thats better
 
Last edited:
Thanks for that :D I don't have a clue how to do that, but I know someone else will find it useful!

Its always appreciated when people update there own threads with answers :D:thumb:
 
Ian Cunningham said:
Thanks for that :D I don't have a clue how to do that, but I know someone else will find it useful!

Its always appreciated when people update there own threads with answers :D:thumb:

i've been searching on google all night and couldn't find a damn thing and the microsoft site was useless, i ended up using the record macro thing and editing it after quickly learning some VB
 
Back
Top