I am trying to set up a macro which saves 1 out of 100 maybe more or less as pdf files.
Right now I am tying to get it so that the "save as" dialogue box does not appear.
Any help with this would be appreciated.
here is the code as it stands now
Sub Test()
Dim HL As Excel.Hyperlink
Dim ws As Excel.Worksheet
Dim strURL As String
Dim strText As String
Dim FSO As Object
Dim ts As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
Set ws = ActiveSheet
For Each HL In ws.Hyperlinks
strURL = HL.Address
ie.navigate strURL
Do Until ie.readystate <> 4
DoEvents
For c = 1 To 5000
Next c
Loop
strText = ie.document.body.innertext
Set ts = FSO.Createtextfile("C:\" & HL.Name & ".txt")
ts.write strText
ts.Close
Next HL
End Sub