Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Western NY, USA
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macros and browsers (XP sr1, i.e.6)

    I thought there were a couple of threads regarding using macros in IE, but I am not finding them.

    Anyway, I have my macro working in 97 & XP, as long as I open it in Excel. However, there is a browser shortcut to it. On our NT boxes running 97, it opens in Excel and runs fine. However, we will be transitioning to Windows XP, Office XP. In XP, Excel opens in the browser and my macro fails at
    workbooks.opentext(...

    The text file is on a local server. The text file can be opened in the browser using serversharepathfilename.txt. However
    workbooks.opentext("serversharepathfilename.txt" ...) does not work in the browser. Typing serversharepathfilename.txt into the browsers address bar does work. Therefore I know the macro is correct since it works in Excel and I know I have access to the text file since I can open from the browser.

    Thanks.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros and browsers (XP sr1, i.e.6)

    The opening behaviour of files accessed by clicking a link is controlled by a setting of the computer in question:

    If you launch Windows Explorer, go to Tools....Folder Options, scorll down and find the "Microsoft Excel Worksheet" file type and click edit.

    On the resulting dialog, there is a checkbox labeled "Browse in the same window" I believe is the reason why it displays in the IE context and not as a
    separate Excel application process.
    Attached Images Attached Images
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Western NY, USA
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros and browsers (XP sr1, i.e.6)

    Yes, it is true, the Open in Browser box is checked. Are you saying then, the only way I can get this to work is to not allow the open in browser?

    I have a couple of Walkenbach's books, including Power programing with Excel. I have M$ IE resource kit, and Internet Explorer 5 Developer Guide from White press, but I don't see the issue of the difference between opening Excel inside a container and opening alone addressed. I do remember having see it addressed somewhere, but my mental index seems to be flawed. I will do some more searching.

    Thanks.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macros and browsers (XP sr1, i.e.6)

    Yes, change that option to open XL files in XL.

    There would definitley be more things that fail when XL is run from a browser window. Experiment! (or better, don't. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>)

    Word misbehaves too when opened in a browser window. E.g. The Thisdocument.Path property yields empty, even when a direct link to a file on one's own HD is clicked. I discovered that when I tried to send my whole company a link to a document that would setup a correspondence system. I just thought to be clever and not send everyone the file, but just the link, so I would have just one file i.s.o. 200 in attachments all over the place...
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •