MastercafeCTV
mastercafe at ctv.es
Sun May 9 14:55:01 CDT 2004
This is the complete Procedure code:
Private Sub imprime_Click()
On Error GoTo Err_imprime_Click
Dim stDocName As String
Dim ctlPtr As Printer
Dim devName As String
Dim strPtr As String 'impresora en curso
Dim TmpImpresora As String
Dim bucle As Integer
Dim sngBot As Single
Dim sngTop As Single
Dim sngLft As Single
Dim sngRgt As Single
Dim resp As Boolean
sngBot = Me.InfBot
sngTop = Me.InfTop
sngLft = Me.InfLeft
sngRgt = Me.InfRight
strPtr = Application.Printer.DeviceName 'this routine is to take a different
printer before launch the current report
TmpImpresora = Me.InfImpr
stDocName = Me.InfNombre
If Me.InfImpr <> "LPT1:" Then
Set Application.Printer = Application.Printers(TmpImpresora)
With Application.Printer
.BottomMargin = sngBot * 567
'.Copies = Me.InfCopias
.TopMargin = sngTop * 567
.LeftMargin = sngLft * 567
.RightMargin = sngRgt * 567
If Me.InfOrienta = 1 Then
.Orientation = acPRORLandscape
Else
.Orientation = acPRORPortrait
End If
End With
End If
If Me.externo <> "STEEL" Then 'external function to open a remote Access
Report to use
resp = fOpenRemoteReportParam(Me.externo, stDocName,
Me.argumentos, Me.SALIDA)
GoTo SALIDA
End If
Select Case Me.SALIDA 'this is the main SELECT to checjk the option
that was selected in the form
Case 1
'OPCION DE SALIDA POR PANTALLA ACTIVAR EL SNAPSHOT
DoCmd.OutputTo acOutputReport, stDocName, acFormatSNP,
cteDirectorio & "\SNP\" & stDocName & Format(Date, "YYMMDD") & ".snp"
DoCmd.OpenForm "SnapShot", acNormal, , , acFormEdit, acDialog,
cteDirectorio & "\SNP\" & stDocName & Format(Date, "YYMMDD") & ".snp"
Case 2
For bucle = 1 To Me.InfCopias
DoCmd.OpenReport stDocName, acNormal, , Me.argumentos
Next bucle
Case 3
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS, cteHojas
& "\" & stDocName & Format(Date, "YYMMDD") & ".xls", ctrlexcel
'If Me.ctrlexcel Then
' AbreExcel cteHojas & "\" & stDocName & Format(Date,
"YYMMDD") & ".XLS"
'End If
Case 4
DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".rtf",
ctrlexcel
Case 5
DoCmd.OutputTo acOutputReport, stDocName, acFormatIIS,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".htx",
ctrlexcel
Case 6 '******************** this is the XML format because without
format you can select this
DoCmd.OutputTo acOutputReport, stDocName, , cteDirectorio & "\"
& stDocName & Format(Date, "YYMMDD") & ".xml", ctrlexcel
Case 7
DoCmd.OutputTo acOutputReport, stDocName, acFormatHTML,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".html",
ctrlexcel
Case 8
DoCmd.OutputTo acOutputReport, stDocName, acFormatASP,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".asp",
ctrlexcel
Case 9
DoCmd.OutputTo acOutputReport, stDocName, acFormatDAP,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".html",
ctrlexcel
Case 10
DoCmd.OutputTo acOutputReport, stDocName, acFormatDAP,
cteDirectorio & "\export\" & stDocName & Format(Date, "YYMMDD") & ".txt",
ctrlexcel
End Select
SALIDA:
If Me.InfImpr <> "LPT1:" Then 'se restablece la impresora si fue
cambiada
Set Application.Printer = Application.Printers(strPtr) 'volvemos a
dejar la q estaba
End If
Exit_imprime_Click:
Exit Sub
Err_imprime_Click:
MsgBox Err.Description
Resume Exit_imprime_Click
End Sub
================================
Mastercafe S.L. NIF - B82.617.614
c/ Piñeres 4, 1ºD (33430 Candas - Asturias)
Juan Menendez Crespo juan at mastercafe.com
www.mastercafe.com
info at mastercafe.com
================================
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: domingo, 09 de mayo de 2004 17:45
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Exporting formats
Can you post the code, you are using, Are you using an xslt transform?
MastercafeCTV wrote:
>We are triying to export in XML format from VBA code, actually we are
>making with all format (TXT, XLS, HTX, HTML, SNP, ASP, DAP) but for the
>XML format we only can use without acformat and then select from a new
>window. We look the main help and some samples but allways put other
>format, not for XML.
>
>Someone have experience to export in XML format from VBA?
>
>TIA
>
>Juan
>
>
>================================
>Mastercafe S.L. NIF - B82.617.614
>c/ Piñeres 4, 1ºD (33430 Candas - Asturias)
>Juan Menendez Crespo juan at mastercafe.com
>www.mastercafe.com
>info at mastercafe.com
>================================
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com