Ver Mensaje Individual
  #12 (permalink)  
Antiguo 24/10/2006, 14:47
Avatar de Myakire
Myakire
Colaborador
 
Fecha de Ingreso: enero-2002
Ubicación: Centro de la república
Mensajes: 8.849
Antigüedad: 22 años, 4 meses
Puntos: 146
Se supone que si colocas

ContentType = "application/unknown"
Response.AddHeader "Content-Disposition", "attachment; filename=" & strFileName
Response.Charset = "UTF-8"

al inicio de tu página, se te descargará el archivo, pero si no es un documento donde puedas agregar esas lineas esta esta otra forma:

Cita:
Set objFile = Nothing
Dim strFilePath, strFileName
Const adTypeBinary = 1
strFilePath = "\\xxx.xxx.xxx.xxx\inetpub\WWWROOT\descargas\borra r.xls"
strFileName = "borrar.xls"
Response.Clear
dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
ContentType = "application/unknown"
Response.AddHeader "Content-Disposition", "attachment; filename=" & strFileName
Response.Charset = "UTF-8"
Response.ContentType = ContentType
Response.BinaryWrite objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
Saludos