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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get access to underlying windows explorer object an manipualte

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I seem stuck understanding how I get access to the windows explorer object and alter it.

I have a browser control on a form and I use the controlsource to navigate to a network folder.

How do I then interact with this, such as change the view or enable the preview pane?

My unbound browser control is called 'Explorer'

And according to this page :
The control property I need is : CurrentViewMode

So I have tried Me.Explorer.Object.Document.CurrentViewMode = 3

But it errors with 'Object doesn't support this property or method'?

I've been scouring :
But cannot find anything to help?

Where is information on how to use this control an manipulate the underlying explorer window?


"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
I give up, I've hunted high and low for hours and all I find is a plethora of people asking the same question, being told the same thing about Me.Explorer.Object.Document.CurrentViewMode and it not working?

The only thread I have manage to find with a solution is this one..


Which basically says Me.Explorer.Object.Document.CurrentViewMode , is rubbish, it doesn't work and the only solution is to use sendkeys?

Only this still doesn't work because of the security warning, so until I have worked out how to stop the security working , it seems impossible to change the view with VBA code?


"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Are you sure? The built-in webcontrol in my copy of Access is simply a wrapper of the Microsoft Internet Controls (a quick look at references in the VBA IDE once you have added a webcontrol to a form will show you this). The Object property exposes the full set of properties of the underlying control.

So ... yes, the Access 'native' webcontrol does not directly have the method, but the control it wraps and completely exposes does.

Now, the next problem is that CurrentViewMode can't be set whilst the explorer window is still loading (and will give the misleading error message that you are seeing), so you need to wait until the readystate is complete





 
It doesn't work any way for what I'm trying to do, poxy thing is offering XLS / DOC etc as downloads rather than embedding in browser control. PDF & TXT so far are the only files that 'load'

I'm trying to build a document management GUI with preview, but it's a damn nightmare!

I can't get the web browser to embed docs and I can't get OLE for XLS / WORD working either [banghead]

Your assistance is much appreciated.






"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top