Printing Function in Excel
January 7, 2009 nnyq.com editSay I have 50 rows in an Excel document and each rows contains a hyperlink to a web page. Is there some kind of function that can loop through the document, go to each link, and print?? Basically, I manage an e-commerce site and printing our orders is the biggest time waster ever. So I would like to copy the page of hyperlinks of our orders and paste it into Excel (maybe some other program would be better) and print. Or, really any solution that anyone has that could speed up the process would be fine. If anyone could point me in the right direction, I'm sure I could figure it out. Thanks.
Option Compare Database
Option Explicit
Private Sub cmdPrint_Click()
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.MenuBar = 0
IE.StatusBar = 0
IE.Toolbar = 0
IE.Left = 1
IE.Top = 1
IE.Height = 1
IE.Width = 1
IE.Visible = True
IE.Silent = True
IE.Visible = True
Set rst = db.OpenRecordset("tblWebPages")
With rst
Do While Not .EOF
IE.Navigate !WebPage
If IE.ReadyState <> 4 Then
IE.ExecWB 6, 2, 0, 0
End If
.MoveNext
Loop
.Close
End With
Set db = Nothing
End Sub
Sub Click()
'
' Click Macro
'
'
Range("A1").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
In excel 2007 hit the large button at the top left. To bring down the large menu. Click Excel Options on the Popular side menu click Show Developer Tab in Ribbon.
I don't know if Macros can open up programs but you should be able to write it yourself. I wish I could teach you how to use macros... Well see if record macro can record going to a URL in a browser but i doubt it.
So we will try... Click the Developer Tab and Select Record Macro see what it can actually do if not edit the VB by hand after selecting one of the rows and stopping the record.
Logically there has to be a class online for something like this... I'm still not even sure if its possible.
#If you have any other info about this subject , Please add it free.# |