Re: Problem with PRINT REPORT TO PDF
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Nov 2009 17:24:15 -0500
"BlueWolverine" <BlueWolverine@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:473AC5E0-09CC-4348-9F5E-610E11B64656@xxxxxxxxxxxxxxxx
Hello,
MS ACCESS 2003 on XP PRO.
A while ago, I found out about lebans.com and the marvelous code there to
print a report to PDF. using VBA. I have found that code to be reliable and
generally awesome. It is with that code that I am having trouble today
however.
Here's the deal. I am using ConvertToPDF in a loop, two loops actually, in
different places.
First place, it works PERFECTLY. I even found some code to automatically
combine the output file with some other stored pdfs and create my end
document automatically. That makes me happy. :-)
Second place, it should be doing the exact same thing except that I am
looping through different options.
***ERROR THAT OCCURS***
In the second place, when I execute the ConvertToPDF function, instead of
outputing the file as expected, where I would hope to see a file whose name
is like "Duty Cycle - Monday: CAR [2009-11Nov-02] [13_15].pdf" I get a file
whose name is "Duty Cycle - Monday -" NOte the lack of extension. It
displays with the broken file icon. I can't open it, and on bad days like
today, I can't delete it later.
I promise I have gone line by line and checked that all these variables are
perfect by the time it gets to the CONVERTtoPDF function call. But please
suggest anything and everything. It's driving me nuts and I can't find where
it is dying. I have included all the code for the broken one. If you need
the successful code, please ask and I will post.
The colon -- character colon ':' -- is not legal to be used in a file name. You'll find that Windows won't let you create a file with that character in its name, nor rename a file so that its name contains that character. See what happens if you use some other character in place of the colon.
In fact, you can't use any of the following characters in a Windows filename: \ / : * ? " < > |
--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html
(please reply to the newsgroup)
.
- References:
- Problem with PRINT REPORT TO PDF
- From: BlueWolverine
- Problem with PRINT REPORT TO PDF
- Prev by Date: Re: Run Saved Import
- Next by Date: Re: loop thru records to create a union query
- Previous by thread: RE: Problem with PRINT REPORT TO PDF
- Next by thread: Differences accdb and accde
- Index(es):
Relevant Pages
|