Execute a php script without opening the IE page

Started by DJozef87, October 03, 2011, 03:17:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJozef87

Hello,

I work with Visio and I have a VBA Macro that calls a php page and executes the script without problem.

This script is executed for each Shape of my document so it opens multiple instances of IE at the same time ... the trick is to try to not have to open these pages.
here is the code that calls my page:


Sub openIE(ByVal URL As String)
   Dim myPageURL As String
   myPageURL = URL
   Dim myIE As Object
      Set myIE = CreateObject("InternetExplorer.application" )
      myIE.Navigate(myPageURL)
End Sub


IE.Visible = False didn't work

Jumpy

With createobject you always create a new Instance of IE.
I recommend to use Getobject instead to grap an existing instance of the IE.
If none exists you'll get an error and than u use CreateObject.

DJozef87

Hello Jumpy,

My problem is that I don't want to open any instance of IE...
Is there another way to call my php script without creating IE instance ?

Jumpy


DJozef87

And I can put this call from VBA ?
the problem is that I pass parameters with the call so my only way is to create the IE instance without opening the browser  :-\

Jumpy

You can use the shell from VBA. Search google for Shell, Shellexecute, sth. like that.
Should be no problem, to pass parameters along.
(! If this happens locally, not if the Script has to be executed on a webserver or sth. like that !)

DJozef87