PDA

View Full Version : VBA PowerPoint iBrowse Urgent Help Please!



mike_c
04-05-2011, 06:48 AM
Hello!

I have created a PowerPoint slideshow that runs in the lobby of a building. The plan is to let it run in a loop 24/7 without human interaction. The slideshow includes slides using the iBrowse plugin from tdogsoftware(dot)com. iBrowse basically opens a ‘frame’ inside a slide where you can point a URL to display.

Here’s my problem: the URL that iBrowse needs to point to has a date value in the query string that needs to be updated dynamically with the current date each time the slide opens. iBrowse lets you use VBA; I am a web developer but have never used VBA.

Documentation tells me to use Object.getUrl(<url>) to point to a URL, but I don’t know how to get the current date or create the updated URL string to pass in.

Here is the link, with the domain replaced: exampleurl(dot)com/login/index.php?fuseaction=dashboard.day_power_combined& date=2011-03-31

Please help! I am desperate to fix this within a day or two before my client notices the URL is not updating!

Thanks!
Mike

Paul_Hossler
04-05-2011, 01:42 PM
Option Explicit

Sub drv()
Dim sURL As String
sURL = "Exampleurl.com/login/index.php?fuseaction=dashboard.day_power_combined&date=" & Format(Now, "yyyy-mm-dd")
MsgBox sURL
'so it'd probably be something like this
'Object.getUrl (sURL)

End Sub



Paul

mike_c
04-05-2011, 02:37 PM
Thank you VERY much Paul! I will give this a try and let you know how it goes!

mike_c
04-05-2011, 06:44 PM
Hi Paul (or anyone else),

Your example worked great for building the string with the dynamic date, and the iBrowse PPT object loads the webpage. I was able to run it in a PPWB1_GotFocus sub that comes up by default. Problem is this sub will not work as it requires the object to get focus with a click or other way - I need it to run automatically.

I had to manipulate the link below so the forum software doesnt recognize it as a link...

Private Sub PPWB1_GotFocus()
Dim sURL As String
sURL = "h t t p s : / / w w w.mypvdata . com/login/index.php?fuseaction=dashboard.day_power_combined&date=" & Format(Now, "yyyy-mm-dd")
MsgBox (sURL)
PPWB1.setUrl (sURL)
End Sub

Can you direct me towards a sub that runs when the slide or iBrowse object loads? I was unable to find a way to get your drv sub to run.

Thanks!
Mike