Re: Problem with PRINT REPORT TO PDF

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"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)

.



Relevant Pages

  • RE: tab align with a colon?
    ... table, do not insert a tab character to indent the text, only add the decimal ... you use this type of tab stop, you must align the numbers around a decimal ... Please don't tell me to use a point instead of a colon because ...
    (microsoft.public.word.tables)
  • Re: JSP substring and trim dont work properly
    ... If you were using Soren's code then your "space" character is not an ASCII space but a single character that looks like the two character sequence ": " (colon, ... As I said, I think it's best to cut and paste code into news group postings, not re-type them. ... public class NonAscii { ...
    (comp.lang.java.programmer)
  • Re: [xnews] set score and move message
    ... sensitive when you use the colon after "Subject". ... sensitivity, remove the colon. ... % Kills any subject header without one lowercase ... % character. ...
    (news.software.readers)
  • Re: Rotating text
    ... "Bill Smith" wrote in message ... > colon followed by first names. ... > around the colon' to print William George Smith. ... > return a string character by character until a specified ...
    (microsoft.public.access.reports)
  • Re: Mix Characters
    ... I will try as you said to get an answer from a Windows forum..if i will find ... encoding do you have the " always save the web page in the default encoding" ... Perhaps go to your Control Panel> Regional and Language Options dialog ... "If you remap your keybord to another character set, ...
    (microsoft.public.publisher.webdesign)