Printing Function in Excel

nnyq.com edit
  • I am a php/flash developer that desperately needs some guidance with Excel (I think).

    Say 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.


  • Since speaking with you last, someone came up with a way to do it in Access. Don't have it completely solved yet, but definitely making progress. Basically, just have a column of hyperlinks and then made a form to run through them, open them in IE, and print. This code was the first version, it has gotten a little more advanced since...


    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


  • You're right, the macro will not record the printing at the URL. It will record clicking on the hyperlink and going to the page, but that is it. That doesn't solve my problem much because it still requires someone to sit there and hit print, which is what I'm trying to do away with. Do you think there is something more I can do by editing the VB manually? Thank you for your help. I'm also going to look into a couple of workspace Macro recorders that aren't program specific and see if I can get anywhere with those. Here is what the macro is right now after I recorded the hyperlink click.


    Sub Click()
    '
    ' Click Macro
    '

    '
    Range("A1").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    End Sub


  • Well excel uses VB script so I guess you may have execute function of some sort...

    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.


  • This is more of kirupa question if you can get him to tell you the C# equivelent i'll translate it to VB for you.

    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.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Printing Function in Excel , Please add it free.

    Why Directory Submission Meru Launches Alliance for VoWi-Fi