Opening IE from Word VBA without scroll bars 
Author Message
 Opening IE from Word VBA without scroll bars

Hi all

I am wanting to open IE from a Word macro without any of
the usual IE trappings. ie. tool bar, menu bar etc. etc.

Using the VBA code below, I have managed to open it pretty
much how I want except for one thing. The scroll bars.

Is it possible to turn off the scrollbars in the opened IE
in a similar fashion to which I am turning off everything
else??

Thanks in advance

Nick

Dim ieApp As Object
Set ieApp = CreateObject("InternetExplorer.application")
ieApp.Left = 100
ieApp.Top = 100
ieApp.Width = 760
ieApp.Height = 360
ieApp.MenuBar = False
ieApp.ToolBar = False
ieApp.AddressBar = False
ieApp.StatusBar = False
ieApp.Resizable = False
ieApp.Visible = True



Sun, 29 Aug 2004 12:28:41 GMT  
 Opening IE from Word VBA without scroll bars
Interesting problem. Normally, this is done by sizing the ie form such that
it's larger than the needed area, so that the scroll bars won't appear. Turn
off the Resizable, and play with it a fix pixels, and if the frame is large
enough, the scroll bars will go away.

The other way it's done is setting the scroll options on a frameset in the
HTML of the URL so that scrolling= no.

--
Regards,

Adam Ulrich
Test Lead, Office Developer
Microsoft Corp

I love talking to customers! So that all can benefit from the discussion,
please post all follow-ups to the newsgroup so that others can read the
entire thread of messages. I won't be able to respond to direct email.

This posting is provided "AS IS" with no warranties, and confers no rights.
Blah-de, blah-de, blah. (The lawyers make me say it <g>)
____________________________


Quote:
> Hi all

> I am wanting to open IE from a Word macro without any of
> the usual IE trappings. ie. tool bar, menu bar etc. etc.

> Using the VBA code below, I have managed to open it pretty
> much how I want except for one thing. The scroll bars.

> Is it possible to turn off the scrollbars in the opened IE
> in a similar fashion to which I am turning off everything
> else??

> Thanks in advance

> Nick

> Dim ieApp As Object
> Set ieApp = CreateObject("InternetExplorer.application")
> ieApp.Left = 100
> ieApp.Top = 100
> ieApp.Width = 760
> ieApp.Height = 360
> ieApp.MenuBar = False
> ieApp.ToolBar = False
> ieApp.AddressBar = False
> ieApp.StatusBar = False
> ieApp.Resizable = False
> ieApp.Visible = True



Sun, 29 Aug 2004 15:37:27 GMT  
 Opening IE from Word VBA without scroll bars
One way to work around that is to create your own local htm file like this:

<HTML>
<HEAD>
<title>Frame Layout Test</title>
</HEAD>
<FRAMESET>
    <FRAME NAME="top" SCROLLING="no" noresize>
    </FRAME>
</FRAMESET>
</HTML>

Then, in your code, load the above html by ieApp.Navigate, and then load the
frame like the below:

ieApp.Document.Frames("top").Document.URL = http://whatever

I did notice that some URL's this worked correctly, and yet others, it still
added scrollbars. I am assuming that there's a way for the HTML to override
the frame's scrolling option.

--
Regards,

Adam Ulrich
Test Lead, Office Developer
Microsoft Corp

I love talking to customers! So that all can benefit from the discussion,
please post all follow-ups to the newsgroup so that others can read the
entire thread of messages. I won't be able to respond to direct email.

This posting is provided "AS IS" with no warranties, and confers no rights.
Blah-de, blah-de, blah. (The lawyers make me say it <g>)
____________________________


Quote:
> Interesting problem. Normally, this is done by sizing the ie form such
that
> it's larger than the needed area, so that the scroll bars won't appear.
Turn
> off the Resizable, and play with it a fix pixels, and if the frame is
large
> enough, the scroll bars will go away.

> The other way it's done is setting the scroll options on a frameset in the
> HTML of the URL so that scrolling= no.

> --
> Regards,

> Adam Ulrich
> Test Lead, Office Developer
> Microsoft Corp

> I love talking to customers! So that all can benefit from the discussion,
> please post all follow-ups to the newsgroup so that others can read the
> entire thread of messages. I won't be able to respond to direct email.

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Blah-de, blah-de, blah. (The lawyers make me say it <g>)
> ____________________________



> > Hi all

> > I am wanting to open IE from a Word macro without any of
> > the usual IE trappings. ie. tool bar, menu bar etc. etc.

> > Using the VBA code below, I have managed to open it pretty
> > much how I want except for one thing. The scroll bars.

> > Is it possible to turn off the scrollbars in the opened IE
> > in a similar fashion to which I am turning off everything
> > else??

> > Thanks in advance

> > Nick

> > Dim ieApp As Object
> > Set ieApp = CreateObject("InternetExplorer.application")
> > ieApp.Left = 100
> > ieApp.Top = 100
> > ieApp.Width = 760
> > ieApp.Height = 360
> > ieApp.MenuBar = False
> > ieApp.ToolBar = False
> > ieApp.AddressBar = False
> > ieApp.StatusBar = False
> > ieApp.Resizable = False
> > ieApp.Visible = True



Sun, 29 Aug 2004 16:17:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Easy to use Checkboxes without using Macros or Forced opening of Word documents outside IE

2. Scroll without scroll bar - VB.net

3. Scrolling without scroll bars (question)

4. Is VBA command calling possible without opening word?

5. Building A Scroll Bar / Scroll Bar Colors

6. Printing multiple Word doc files without opening each in word

7. Listbox without scroll bars (VB4, Win95)

8. list boxes without scroll bars

9. Using VBA Automation to Open Word at the File Open Locatiion

10. Opening IE without Toolbar and Menu ..

11. Showing Command Bars for Word Document in IE window

12. OLE and MS Word - Scroll Bars

 

 
Powered by phpBB® Forum Software