ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Writing VBA code in Excel to Print Power point slides, and a PDF r (https://www.excelbanter.com/excel-programming/373625-writing-vba-code-excel-print-power-point-slides-pdf-r.html)

Quietman

Writing VBA code in Excel to Print Power point slides, and a PDF r
 
Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing

Tom Ogilvy

Writing VBA code in Excel to Print Power point slides, and a PDF r
 
One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing


Quietman

Writing VBA code in Excel to Print Power point slides, and a P
 
Tom thanks for the links, but the first 2 are not working
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing


Tom Ogilvy

Writing VBA code in Excel to Print Power point slides, and a P
 
the third one should be sufficient, but if you want mo

http://msdn.microsoft.com/library/en...plications.asp

--
Regards,
Tom Ogilvy


"QuietMan" wrote:

Tom thanks for the links, but the first 2 are not working
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing


Quietman

Writing VBA code in Excel to Print Power point slides, and a P
 
Tom

here is waht I came up with, but cannot get it to work
very new at this, and the excel 97 examples don't work either

Sub Macro1()
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Set pptApp = CreateObject("PowerPoint.Application")
Set pptPres = pptApp.Presentations.Open("P:\Test\DRAFT.ppt")

With pptPres.PrintOptions
.RangeType = ppPrintSlideRange
With .Ranges
.ClearAll
.Add Start:=3, End:=3
.Add Start:=8, End:=8
.Add Start:=11, End:=11
.Add Start:=14, End:=14
End With
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "\\strnynt32\STHQPB_4003B2"
End With
Active
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

the third one should be sufficient, but if you want mo

http://msdn.microsoft.com/library/en...plications.asp

--
Regards,
Tom Ogilvy


"QuietMan" wrote:

Tom thanks for the links, but the first 2 are not working
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing


Quietman

Writing VBA code in Excel to Print Power point slides, and a P
 
Made some progress
but it bombs out at 'OutputType = ppPrintOutputSlides'
line in the code, any understanding?

Sub Macro1()
Dim pptApp As Object
Dim pptPres As Object

Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
Set pptPres = _
pptApp.presentations.Open("P:\Financial Planning &
Analysis\Month-QTR Support\2006\08 - Aug\Development Data\DRAFT- REG Deal
Pipeline Data Book - August 2006.v1.ppt")

With pptPres.PrintOptions
.RangeType = ppPrintSlideRange
With .Ranges
.ClearAll
.Add Start:=3, End:=3
.Add Start:=8, End:=8
.Add Start:=11, End:=11
.Add Start:=14, End:=14
End With
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "\\strnynt32\STHQPB_4003B2"
End With
ActivepptPres.PrintOut
End Sub

--
Helping Is always a good thing


"Tom Ogilvy" wrote:

the third one should be sufficient, but if you want mo

http://msdn.microsoft.com/library/en...plications.asp

--
Regards,
Tom Ogilvy


"QuietMan" wrote:

Tom thanks for the links, but the first 2 are not working
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel, power point
acrobat
was wondering if there was a way to priting the non excel reports using vba
written in excel
--
Helping Is always a good thing


Tom Ogilvy

Writing VBA code in Excel to Print Power point slides, and a P
 
the constant ppPrintOutputSlides or any other constant in the powerpoint
object library will be undefined when using late binding such as you are
using. You will have to go into powerpoint and find what the value is and
use the value instead of the constant. Here are the values for the ones I
saw.

? ppPrintSlideRange
4
? ppPrintOutputSlides
1
? ppPrintColor
1

--
Regards,
Tom Ogilvy




"QuietMan" wrote in message
...
Made some progress
but it bombs out at 'OutputType = ppPrintOutputSlides'
line in the code, any understanding?

Sub Macro1()
Dim pptApp As Object
Dim pptPres As Object

Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
Set pptPres = _
pptApp.presentations.Open("P:\Financial Planning &
Analysis\Month-QTR Support\2006\08 - Aug\Development Data\DRAFT- REG Deal
Pipeline Data Book - August 2006.v1.ppt")

With pptPres.PrintOptions
.RangeType = ppPrintSlideRange
With .Ranges
.ClearAll
.Add Start:=3, End:=3
.Add Start:=8, End:=8
.Add Start:=11, End:=11
.Add Start:=14, End:=14
End With
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintColor
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "\\strnynt32\STHQPB_4003B2"
End With
ActivepptPres.PrintOut
End Sub

--
Helping Is always a good thing


"Tom Ogilvy" wrote:

the third one should be sufficient, but if you want mo

http://msdn.microsoft.com/library/en...plications.asp

--
Regards,
Tom Ogilvy


"QuietMan" wrote:

Tom thanks for the links, but the first 2 are not working
--
Helping Is always a good thing


"Tom Ogilvy" wrote:

One approach would be to use automation:

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using
Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

--
Regards,
Tom Ogilvy




"QuietMan" wrote:

Creating a print control file and printing reports from excel,
power point
acrobat
was wondering if there was a way to priting the non excel reports
using vba
written in excel
--
Helping Is always a good thing





All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com