Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Accessing Local File in IE 9
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01530020
Message ID:
01530058
Views:
52
>>>>>Have some simple code which opens an HTML file and grabs the Document.DocumentElement.innerText:
>>>>>
>>>>>oIE = CREATEOBJECT("InternetExplorer.Application")
>>>>>oIE.Navigate(Somefile.htm)
>>>>>cText = oIE.Document.DocumentElement.innerText
>>>>>
>>>>>When running this code in Windows7 64 Bit (IE 9) and selecting a Local File, I get an Error message that "Document is not an object".
>>>>>
>>>>>This code works correctly if the File is on the Web or on a Network Drive. There is no problem in Windows XP running IE 8.
>>>>>
>>>>>Does a Setting in IE 9 have to be tweaked to make this work properly?
>>>>
>>>>
>>>>Try running the calling VFP program as Administrator.
>>>
>>>Thanks for your reply John..
>>>
>>>I have Administrative Privileges...Also this is not a practical solution as this code is to be part of an Application on various user's machines.
>>
>>Marshal,
>>it's not a matter if it's practical or not. It's a matter of tracking down the problem so you know if it's a rights problem or not. Windows 7 64 bit is total pain in the a.. on this. I suggest you try it anyway. That means right clicking on the icon and selecting run as administrator. Good chance it will work. Once you know if this makes it run you then know where the problem is.
>
>Hi John,
>
>Ran VFP as Administrator and that did fix the problem...Guess that's Microsoft going Security nuts again..Annoying considering no problem with Network or Web files..
>
>Thanks for the nudge..

Marshal,
You are very welcome. Now you need to move the files you need to read into a folder where you have rights. If this is a file you are creating on the fly use the user's temp folder or create a folder off the root. Let me know if you need code for this. I'm no expert in this, just found what works for me.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform