Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Looping with pdf-printing

Hello,

I´m have earlier made a vba-programming for printing (looping).
Now I´m trying to do the same and to save all prints at the same place
like pdf. Do anyone know what I have done wrong? I´l be wery grateful
for your help. Se my code below.

Br
Mia

Sub Skrivpdftest()
'
' Skriv Makro
' Makrot inspelat 2006-11-28 av F


Dim Start As Integer
Dim Stopp As Integer
Dim SkrivUt As String
Sheets("Kunddata").Select
Start = Range("C10").Value
Stopp = Range("C11").Value

For i = Start To Stopp
Sheets("Kunddata").Select
Range("C12").Value = i
SkrivUt = Range("F12").Value
If SkrivUt = "S" Then

If Dir(Environ("commonprogramfiles") & "\Microsoft Shared\OFFICE" _
& Format(Val(Application.Version), "00") & "\EXP_PDF.DLL") < "" Then

FilenameStr = "M:\Försäkringsbevis\" & _
ActiveSheet.Range("b4").Value & ".pdf"

Sheets("Faktura").Select

ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=FilenameStr, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=Prewiev

Sheets("Faktura").Select


Next
Sheets("Kunddata").Select
End If
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
urgent-looping through data validation list then printing as per each value kidkarma Excel Programming 3 February 26th 07 02:18 AM
Printing multiple rpts via Looping AK Excel Programming 4 December 8th 05 04:43 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM
strange printing/looping problem Omar78 Excel Programming 5 June 7th 04 05:39 PM


All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"