error in docmd.outputto...

error in docmd.outputto...

am 29.11.2007 11:25:52 von inika301

Mr Lebans. Could you help me ? We are trying to run your mdb to
convert access reports to pdf but we can not, because an error
happens. We are just using the A2000SnapShotToPDFver751 that is
abailable for downloading.

I have copied the two dlls to windows/system32 and they are too in the
same path as the mdb.

I have debuged your code and in the proc.ConvertReportToPDF when
running command DoCmd.OutputTo... an error occurs.

Public Function ConvertReportToPDF(...
) As Boolean


DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)", _
strPathandFileName


ERROR message:
"El formato en el que intenta crear el objeto actual no est=E1
disponible.
"
in english

"The format in which tries to create the current object is not
available."

S.O: windows 2003 server
access ver: 2002
snapshot looks o.k cause i can export your to (snp) format

Any idea?

Re: error in docmd.outputto...

am 30.11.2007 21:04:33 von Stephen Lebans

This is the reply I emailed you yesterday. Not sure why you did not receive
it.

Here is a detailed explanation of the issue by a Spanish Access MVP:



Well. There is a bug in spanish Access XP and 2003 (and probably in other
non-english versions).When spanish Access Xp or Access 2003 install, they
write a wrong entry in windows registry for the Snapshot Format. I mean,
they write this (for Access XP):



HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Access\Rep ort



Formats\snp,,1,Formato Snapshot (*.snp),0



which is a translation of something that had to be written in english (note
the "Formato Snapshot" spanish translation of "Snapshot Format"). I mean,
they should write:



HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Access\Rep ort



Formats\snp,,1,Snapshot Format (*.snp),0



which is the correct one!



The same happens with Access 2003.



AFAIK, this bug is not fixed. It stills there.



So, if you use the PDF converter in some of these spanish versions, and the
problem of the wrong registry value hasn't been previously fixed... well,
Access says that "The format is not avalable" ... or so, I don't remember
the exact message, meaning that it cannot find the Snapshot Format value in
registry, and obviously, it stops there.



When you correct that value in windows registry, everything goes all right.



To reproduce this situation, you can temporarily change that value in
registry for whatever other you want, and then you try the PDF converter.



Saludos,



Juan M Afan de Ribera



[MVP Access]


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


wrote in message
news:0e7adf48-f2ec-4edd-a23f-d59755c71389@i12g2000prf.google groups.com...
Mr Lebans. Could you help me ? We are trying to run your mdb to
convert access reports to pdf but we can not, because an error
happens. We are just using the A2000SnapShotToPDFver751 that is
abailable for downloading.

I have copied the two dlls to windows/system32 and they are too in the
same path as the mdb.

I have debuged your code and in the proc.ConvertReportToPDF when
running command DoCmd.OutputTo... an error occurs.

Public Function ConvertReportToPDF(...
) As Boolean
..
..
DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)", _
strPathandFileName
..

ERROR message:
"El formato en el que intenta crear el objeto actual no está
disponible.
"
in english

"The format in which tries to create the current object is not
available."

S.O: windows 2003 server
access ver: 2002
snapshot looks o.k cause i can export your to (snp) format

Any idea?