Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
Back to Access Forum    Comments List
Print Website from Access Upload Images   Link   Email  
John H 
I am very new to vba, and have not been able to figure out how to print a website from Access or how to save a website as a pdf to a file on my hard drive.  Following are my failed attempts to do so.  What do I need to do to get either method below to work?  Also, there is an issue of pausing Access to allow time for the webpage to finish loading.  I hope this is easy for someone, and that I hear from someone soon.


Dim Webloc As String
Dim IE As Object
Dim FullWeb As String
Dim sFolder As String

sFolder = "H:\Property Tax Consulting\Annual Files\2017\" & Me.Log
Set IE = CreateObject("InternetExplorer.Application")
Webloc = Me.AppraisalDistrictPropertyID
FullWeb = "www.dallascad.org/AcctDetailRes.aspx?ID=" & Webloc
With IE

    .Visible = True
    .Navigate FullWeb
    'Private Declare Sub sapiSleep Lib "kernel32" _
    '    Alias "Sleep" (ByVal dwMillisecons As Long)
    'Sub sSleep(lngMilliSec As Long)
    'If lngMilliSec > 0 Then
    '    Call sapiSleep(lngMilliSec)
    'End If
'Sub sTestSleep()
'Const cTIME = 1000 'in MilliSeconds
'    Call sSleep(cTIME)
'End Sub
    '.ExecWB 6, 2
    '    Call PDFPrint(sFolder & "\a.pdf")
    
    CreateObject("Shell.Application").Namespace(0).ParseName(sFolder & "\a.pdf").InvokeVerb ("Print")

MsgBox "Done"

'Dim S As String

' S = "http://www.dallascad.org/AcctDetailRes.aspx?ID=" & AppraisalDistrictPropertyID
' S = Replace(S, " ", "+")

'Dim pdfFile, printName

'    pdfFile = "c:\TempC\0xx.pdf"
'    printName = "Microsoft Print to PDF"

' ShellExecute(S, "printto", """ & pdfFile & """,""" & printName & """,null,1)
' ShellExecute (S, printo, pdfFile, printName, null, 1)

End With
IE.Quit
Set IE = Nothing
Exit Sub
End Sub




Reply from Alex Hedley:

So what is working and what isn't?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 8:30:18 AM. PLT: 0s