Re: ConvertReportToPDF (Lebans) und die Access 2003 Runtime ...

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

"Olaf Rabbachin" <Olaf_NoSpam@xxxxxxxxxxxx> schrieb im Newsbeitrag
news:%23LDeV9uaHHA.2436@xxxxxxxxxxxxxxxxxxxxxxx
Huhu!

Ich habe aktuell Probleme mit dem PDF-Converter von Stephen Lebans.
Während
das Ding in einer regulären Access2003-Umgebung anstandslos läuft,
funktioniert es von einer Access2003 Runtime Version aus nicht (diverse
Rechner). Der "Patch", den Karsten Pries mal bereitgestellt hat, ist
eingebaut. Die Registry besagt, dass das Snapshot Format installiert zu
sein scheint (Wert für HKLM\SOFTWARE\Microsoft\Office\11.0\Access\Report
Formats/Snapshot Format = "snp,,1,Snapshot Format (*.snp),0").
Beim Aufruf kommt dann aber immer der Fehler #2282: "Das Format, in dem
Sie
das aktuelle Objekt auszugeben versuchen, ist nicht verfügbar".

Hat jemand eine Idee, woran's liegen könnte?

Das legt daran, dass MS dauernd die String-Konstante verändert hat. Und zwar
nicht nur zwischen den Versionen, sondern auch noch etwa zwischen den
Service Packs für A2003. Zu allem Überflüss gibt es dann anscheinend noch
unterschiedlich fültige String je nach Sprachversion.
Deshalb setze ich eine Hilfsroutine wie folgt ein:

'Hilfsroutine wegen Bug der String-Konstanten acFormatSNP
Function OutputSnapshot(Reportname As String, _
OutputFile As String, _
Optional Autostart As Boolean) As Boolean
Dim i As Long
Dim arrFormats As Variant
Dim bOK As Boolean

arrFormats = Array("Snapshot Format", _
"Snapshot Format (*.snp)", _
"Snapshot-Format (*.snp)")
On Error Resume Next
For i = 0 To 2
Err.Clear
DoCmd.OutputTo acOutputReport, _
Reportname, _
arrFormats(i), _
OutputFile, Autostart
If Err.Number = 0 Then
Debug.Print arrFormats(i)
bOK = True
Exit For
End If
Next i
OutputSnapshot = bOK
End Function

Ciao, Sascha


.



Relevant Pages

  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)
  • Re: Save a File from a Text Box
    ... Function DriveExists(ByVal sDrive As String) As Boolean ... 'get the string that contains all drives ... Public Function FileExistAs Boolean ... Dim blnResult As Boolean ...
    (microsoft.public.access.modulesdaovba)
  • Re: Save a File from a Text Box
    ... Dim sSource as string ... Public Function FileExistAs Boolean ... Dim intRet As Integer ...
    (microsoft.public.access.modulesdaovba)
  • Re: Save a File from a Text Box
    ... The sSource is passing the verification with no problems, however, the sDest ... Dim sSource as string ... Public Function FileExistAs Boolean ...
    (microsoft.public.access.modulesdaovba)
  • Re: Save a File from a Text Box
    ... how do I get it to verify the path&file found in my text box; ... Function DriveExists(ByVal sDrive As String) As Boolean ... Public Function FileExistAs Boolean ... Dim blnResult As Boolean ...
    (microsoft.public.access.modulesdaovba)