Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 3rd, 2003, 10:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default Office automation & ASP issue

I'm using ASP to automate a link to Excel to create a spreadsheet, before I do the automation I display a msgbox. In some cases - usually after browsing for a while - the page opens, but none of the code runs - including the message box.

If I save the source code as a HTML file and then open it in a new browser it loads and runs first time, any ideas what could cause this situation.
__________________
All the best

Greg
------------------
Greg Griffiths
Web & Livelink Developer
http://www.greggriffiths.org
Reply With Quote
  #2 (permalink)  
Old July 4th, 2003, 08:51 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think your problem is that msgbox() is designed to display a message dialog box to the console of the computer it is running on. In the case of an ASP page, it is running on your web server.

Therefore you as the client will never see the dialog box. Also one note, your web host server must have office web components installed to be able to create an Excel server object using ASP.

Reply With Quote
  #3 (permalink)  
Old July 5th, 2003, 05:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

The MsgBox is part of the client side VBScript that is returned from the ASP page, as is the Office Automation call - this happens on the CLIENT side.

9 times out of 10 this all works fine, especially in a new browser session, but in the other cases the browser will just render an empty page - but saving the source as a .html and running that in a new browser works fine.
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Office Automation- open word document ayazhoda Access VBA 2 November 4th, 2008 12:01 PM
Issue with Office Interop karveajit .NET Framework 1.x 1 November 28th, 2005 06:56 AM
Is this Office Automation with COM? Aaron Edwards ASP.NET 1.0 and 1.1 Basics 1 July 9th, 2004 02:12 PM
ASP & Office Automation Greg Griffiths Classic ASP Basics 0 July 3rd, 2003 10:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.