Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have posted this on so many boards I am shocked that noone has an answer.
I have a macro running in excel 2007 that opens many pdf's from different webpages and saves them. I have no problem navigating around IE through vba, BUT how can I control printing via the IE window when a pdf is opened INSIDE the IE window. I would be happy to post a screenshot of the window a) if thats allowed and b) if someone describes how to do so. Help!! thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I dont' know how you'd do this. I'd suggest maybe useing SENDKEY ?
"thomas donino" wrote: I have posted this on so many boards I am shocked that noone has an answer. I have a macro running in excel 2007 that opens many pdf's from different webpages and saves them. I have no problem navigating around IE through vba, BUT how can I control printing via the IE window when a pdf is opened INSIDE the IE window. I would be happy to post a screenshot of the window a) if thats allowed and b) if someone describes how to do so. Help!! thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sendkey is to unreliable. There must be IE controls that allow selecting and
manipulating printers "Patrick Molloy" wrote: I dont' know how you'd do this. I'd suggest maybe useing SENDKEY ? "thomas donino" wrote: I have posted this on so many boards I am shocked that noone has an answer. I have a macro running in excel 2007 that opens many pdf's from different webpages and saves them. I have no problem navigating around IE through vba, BUT how can I control printing via the IE window when a pdf is opened INSIDE the IE window. I would be happy to post a screenshot of the window a) if thats allowed and b) if someone describes how to do so. Help!! thank you |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Post the code you currently use for 'navigating around IE through vba'. I'd be surprised if IE doesn't expose its objects. What version of IE? I had some trouble, but succeeded in the end, with establishing the right printer to print pdf files to for any machine on a largish company network, but it depended on which version of Acrobat was installed (and some of the Adobe object maodel manuals were plain wrong). I'd guess that you'd have to go through a similar (and simpler) process with IE with a pdf in an IE window. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=130328 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry p45cal, I was in transit to the office
The code is below, less the real user pass, and i ended it at the point where it brings the pdf up in IE Sub AutomateMornTasks() Dim ie As InternetExplorer Dim RegEx As RegExp, RegMatch As MatchCollection Dim strMainPathdfj As String Dim strFiletoFind As String Dim strMainPathstu As String Dim strDatePart As String Dim PrinterToUse As String Dim strNetworkPrinter As String Dim ipf As Object Dim Username As String Dim password As String Dim my_var As String Username = "xxxx" password = "xxxx" Set ie = New InternetExplorer Set RegEx = New RegExp strMainPathdfj = "http://www.elliottwave.com/dfj/archives/" strMainPathstu = "http://www.elliottwave.com/stu/archives/" 'open Internet Explorer, navigate to Ewave site Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .Navigate "www.elliottwave.com/" Do While .ReadyState < 4 Or _ .Busy = True Loop 'check to see if I am already logged in, if not then log in my_var = .Document.body.innerhtml If InStr(1, my_var, "Please Login", vbTextCompare) 0 Then Set ipf = .Document.getElementById( _ "ewiHeader_ucEwiLogin_userid") ipf.Value = Username Set ipf = .Document.getElementById( _ "ewiHeader_ucEwiLogin_password") ipf.Value = password Set ipf = .Document.all.Item("id") Set ipf = .Document.getElementById( _ "ewiHeader_ucEwiLogin_ibGo") ipf.Select ipf.Click End If End With 'create string for filename If Weekday(Date) = 1 Then strDatePart = Replace(Format(Date - 2, "mmdd"), "/", "") strFiletoFind = strMainPathdfj & strDatePart & "dfjww" & ".pdf" Else If Weekday(Date) = 7 Then strDatePart = Replace(Format(Date - 1, "mmdd"), "/", "") strFiletoFind = strMainPathdfj & strDatePart & "dfjww" & ".pdf" Else strDatePart = Replace(Format(Date, "mmdd"), "/", "") strFiletoFind = strMainPathdfj & strDatePart & "dfj" & ".pdf" End If End If With ie ..Visible = True ..Navigate2 strFiletoFind end with end sub "p45cal" wrote: Post the code you currently use for 'navigating around IE through vba'. I'd be surprised if IE doesn't expose its objects. What version of IE? I had some trouble, but succeeded in the end, with establishing the right printer to print pdf files to for any machine on a largish company network, but it depended on which version of Acrobat was installed (and some of the Adobe object maodel manuals were plain wrong). I'd guess that you'd have to go through a similar (and simpler) process with IE with a pdf in an IE window. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=130328 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() OK. Clearly I can't get to the same pdf files, nor to the page they might be on because of login and passwords. Do you know of either: - demo pdfs or similar pdfs accessible in the same way at that site or -elsewhere on the web where pdfs are available in the same way as the pdfs on the elliottwave site? so that I can experiment. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=130328 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Open a pdf that opens in explorer from any website. its the same thesis, a
pdf thats open in explorer. I perused the site in question but i dont see any free pdf's to download. "p45cal" wrote: OK. Clearly I can't get to the same pdf files, nor to the page they might be on because of login and passwords. Do you know of either: - demo pdfs or similar pdfs accessible in the same way at that site or -elsewhere on the web where pdfs are available in the same way as the pdfs on the elliottwave site? so that I can experiment. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=130328 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thomas,
See my previous post in your "testing url string" subject line post (thread link below) and let me know if that does the trick. Best, Matthew Herbert http://www.microsoft.com/communities...d-b69d6540aa52 "thomas donino" wrote: Open a pdf that opens in explorer from any website. its the same thesis, a pdf thats open in explorer. I perused the site in question but i dont see any free pdf's to download. "p45cal" wrote: OK. Clearly I can't get to the same pdf files, nor to the page they might be on because of login and passwords. Do you know of either: - demo pdfs or similar pdfs accessible in the same way at that site or -elsewhere on the web where pdfs are available in the same way as the pdfs on the elliottwave site? so that I can experiment. -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=130328 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Controls | Excel Programming | |||
Excel controls vs vba controls | Excel Programming | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
VB Controls | Excel Programming | |||
Event procedures for controls added with Controls.Add | Excel Programming |