Private Sub UserForm_Initialize()
With Me
.btnCargarPDF.Enabled = False
.txtNombrePDF.Enabled = False
End With
End Sub
'
Private Sub btnCargarPDF_Click() 'carga el pdf al formulario
Me.WebBrowser1.Navigate Me.txtNombrePDF.Value
Value = pdf esto le agregue pensando que iba funcionar pero no
End Sub
'
Private Sub btnExaminar_Click() 'busca el pdf
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = Application.DefaultFilePath & " \ "
.Title = "Programas a Medida - Abrir archivo PDF"
.Filters.Clear
.Filters.Add "PDF files", "*.pdf"
.InitialView = msoFileDialogViewDetails
.Show
If .SelectedItems.Count = 0 Then
Else
Me.txtNombrePDF.Value = .SelectedItems(1)
End If
End With
' 'Me = Nuestro formulario
With Me
If .txtNombrePDF.Value <> "" Then
.btnCargarPDF.Enabled = True
Else
.btnCargarPDF.Enabled = False
End If
End With
End Sub
Desde ya muchas gracias a todos Saludos desde Argentina
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Hola
Una consulta quizas alguien me puede ayudar
Tengo hecho el código para enviar whatsapp desde excel. Quiero adjuntarle pdf. Para enviar lista de precio a clientes.
Tengo hecho lo de buscar el pdf, traerlo, me falta lo de enviarlo
Aquí les muestro el código
Sub dale_Click() Este boton manda el whatsapp
Dim mensaje As String
Dim numero As String
numerodatos = Hoja13.Range("c" & Rows.Count).End(xlUp).Row
'MsgBox (numerodatos)
For fila = 8 To numerodatos
'me busca en los datos los numeros a los que mandar
numero = Cells(fila, 3).Value
mensaje = Range("H6")
pdfok = pdf 'esto no me funciona lo de adjuntar el pdf
seguir = "https://api.whatsapp.com/send?phone=" & numero & "&Text=" & mensaje & pdfok
ActiveWorkbook.FollowHyperlink seguir
Application.Wait (Now + TimeValue("00:00:03"))
ActiveWindow.Application.SendKeys "{TAB}"
ActiveWindow.Application.SendKeys "(~)" 'abre whatsapp
Application.Wait (Now + TimeValue("00:00:07"))
Call SendKeys(pdfok, True) esto no me funciona
ActiveWindow.Application.SendKeys "(~)" 'manda el mensaje
Range("f1").Select
Application.CutCopyMode = False
Next
End Sub
Private Sub UserForm_Initialize()
With Me
.btnCargarPDF.Enabled = False
.txtNombrePDF.Enabled = False
End With
End Sub
'
Private Sub btnCargarPDF_Click() 'carga el pdf al formulario
Me.WebBrowser1.Navigate Me.txtNombrePDF.Value
Value = pdf esto le agregue pensando que iba funcionar pero no
End Sub
'
Private Sub btnExaminar_Click() 'busca el pdf
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = Application.DefaultFilePath & " \ "
.Title = "Programas a Medida - Abrir archivo PDF"
.Filters.Clear
.Filters.Add "PDF files", "*.pdf"
.InitialView = msoFileDialogViewDetails
.Show
If .SelectedItems.Count = 0 Then
Else
Me.txtNombrePDF.Value = .SelectedItems(1)
End If
End With
'
'Me = Nuestro formulario
With Me
If .txtNombrePDF.Value <> "" Then
.btnCargarPDF.Enabled = True
Else
.btnCargarPDF.Enabled = False
End If
End With
End Sub
Desde ya muchas gracias a todos Saludos desde Argentina