print pdf's with changing filenames in a macro
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
I have created a macro to isolate certain data based on a variable
loop. I would like to print the data to a pdf file. I was able to get
it to print but it always uses the same filename; "Group" The
following code in a k loop works to make fn$ the filename I desire; I
checked it by sending the fn$ to sequential cells of a sheet.
How can I get the pdf filename to change within the loop?
Thanks for any help.
Charlie
s$ = Str(k)
If k < 10 Then s$ = "0" & Right(s$, 1) Else s$ = Right(s$, 2)
fn$ = "Group" & s$ & ".pdf"
filename:=fn$
ActiveWindow.SelectedSheets.PrintOut Copies:=1
.
Relevant Pages
- How to speed up a code loop with INSERT INTO query?
... Needing to import and parse data from a large PDF file into an Access ... I start by converted the PDF file to a html file. ... Later, I can then loop through and parse these 800,000 strings into ... The problem I have is that the conversion of the text file, ... (comp.databases.ms-access) - Re: Rename files and save them as pdf
... ..pdf doesn't make it a pdf file. ... Each time through the loop you get the next directory name in MyName, ... Place your recorded code where the Debug.Print statement is in the example ... part - how to extract the name of each subfolder and assign it to the ... (microsoft.public.excel.programming) - Re: print pdfs with changing filenames in a macro
... Tom Ogilvy wrote: ... I would like to print the data to a pdf file. ... following code in a k loop works to make fn$ the filename I desire; ... (microsoft.public.excel.programming) - Re: print pdfs with changing filenames in a macro
... Tom Ogilvy wrote: ... I would like to print the data to a pdf file. ... following code in a k loop works to make fn$ the filename I desire; ... (microsoft.public.excel.programming) - programming to work with pdf file
... - loop through PDF files ... So one PDF file gets split into two. ... Documentation is so non-existant. ... Prev by Date: ... (microsoft.public.dotnet.languages.csharp) |
|