【问题标题】:Printing Multiple URLs from a Notepad从记事本打印多个 URL
【发布时间】:2018-11-03 11:28:03
【问题描述】:

我在 Excel 文件中有很多网址。我正在尝试以静默模式打开每个 URL 并将页面打印/另存为 PDF。我有下面的代码。这有效,但要求打印确认(打印对话窗口)。任何人都可以有想法以静默模式打印,即不显示打印对话窗口。

Sub View_Tech_Recalls()
    Set ie = CreateObject("InternetExplorer.Application")

   Recall_URL = Range("A1").Value
    ie.Navigate Recall_URL
    ie.StatusBar = False
    ie.Toolbar = True
    ie.Visible = True
    ie.Resizable = True
    ie.AddressBar = False


    TimeOutWebQuery = 5
    TimeOutTime = DateAdd("s", TimeOutWebQuery, Now)
    Do Until ie.ReadyState = 4
        DoEvents
        If Now > TimeOutTime Then
            ie.stop
            GoTo ErrorTimeOut
        End If
    Loop




    Application.Wait (Now + TimeValue("0:00:03"))

    ie.ExecWB 6, 2

ErrorTimeOut:


    Set ie = Nothing
End Sub

【问题讨论】:

    标签: excel vba


    【解决方案1】:

    我不确定是否能满足您的要求,但也许 ExportAsFixedFormat Type:=xlTypePDF 可能是您的解决方案?

    那么你可以设置application.displayalerts = false提前执行,所以应该比较安静。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-07-21
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 2012-10-19
      • 1970-01-01
      • 2017-12-10
      相关资源
      最近更新 更多