Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print web page from access command button

Status
Not open for further replies.

mcfaddea

Technical User
Apr 7, 2003
24
GB
anyone who can offer advice on this will be greatly appreciated.

I have spent about two weeks attempting to get this to work but no joy.

I run a database that is in constant use and its purpose is to speed and aid my colleagues. However one of the bains of our lives is when we do the webscrape. This is basically printing about 20 different pages from diff websites. I want to be able to do this from one command button on a form.

Any ideas???
Cheers
Alan



 
Further to this I have attempted using send keys and follow hyperlink. The follow hyperlink works and I can send ctrl+ p to bring up print dialogue box, but sending enter actions on the web page itself not the dialogue box. think this might work if I could set focus to print dialogue but can't work this either.
 
Further to this I have tried

Sub ShellPrint()

Dim strPath As String
Dim strShellStatment As String
Dim dRetVal As Double

' Get the path to Internetexplorer.exe.
strPath = "C:\Program Files\Internet Explorer"

'build the first Shell function argument.
strShellStatment = strPath & "\iexplore.exe "

' Build shell to complete web page argument
strShellStatment = strShellStatment & " /p"

' Execute the Shell function.
dRetVal = Shell(strShellStatment, 1)

' If the Shell function call fails, 0 is returned.
If dRetVal = 0 Then
' The Shell function failed. Enter error-trapping code here.
MsgBox "The Shell command failed!", vbCritical
End If

End Sub


Still no joy

Any ideas
mcfaddea
 
Surely someone has tried this before, I will have no hair left at this rate. Only other option I can think of is sending the command that would run print shortcut icon in menu-bar, but I have no idea how that could be done!!

Cheers
Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top