Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 19th, 2007, 07:17 PM
Friend of Wrox
Points: 6,378, Level: 34
Points: 6,378, Level: 34 Points: 6,378, Level: 34 Points: 6,378, Level: 34
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,822
Thanks: 12
Thanked 14 Times in 14 Posts
Send a message via AIM to mat41
Default Creating word doc - word behaviour

I have a local 2003 MS Word SP2 - When I create word docs using ASP it all works fine, saves fine, views fine - no problems here.

However

The SOE I am coding for is 2003 MS Word SP1 - When I run the same code the word doc gets built, but the doc opens with all my table borders on. It is a heirachial type workflow doc with loads of tables, or the potential to have loads due to it all being built by user inputs, etc

A print preview does not include the borders, nor when its printed.

BTW: I have placed my style sheet inside the .asp page, no include is present. Am creating the doc like so:

Response.ContentType = "application/msword"

1..Any ideas how to get rid of these annoying borders?
2..Any ideas of the syntax to dictate the file name also? It defaults to the page name of the ASP file which generates the doc. I wish to place the date and a database value as the file name (if achieved I do realize the user can change this)

TYIA


Wind is your friend
Matt
__________________
Wind is your friend
Matt
Reply With Quote
  #2 (permalink)  
Old April 26th, 2007, 04:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

Have you not tried upgrading the SP1 to SP2 as you believe it works on that ?

Alternatively there are a few other ways of doing this, see http://www.greggriffiths.org/webdev/both/excel/ for methods of doing a similar thing with Excel rather than word.

Also remember that of you use CSS to manage your style that the External CSS reference needs to be Absolute and not Relative in this case.
Reply With Quote
  #3 (permalink)  
Old April 29th, 2007, 06:46 PM
Friend of Wrox
Points: 6,378, Level: 34
Points: 6,378, Level: 34 Points: 6,378, Level: 34 Points: 6,378, Level: 34
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,822
Thanks: 12
Thanked 14 Times in 14 Posts
Send a message via AIM to mat41
Default

Would very much like to upgrade to SP2 however this is a very strict SOE (Defence), this is not an option.

Your web site has some great tips on creating .xls files. I have used your wisdom in the past however I can not see anyting to resolve my problem there. It was the first place I looked, after Wrox of course...

The CSS thing. I always use absolute paths where ever possible. To avoid any potential issues I have included my styles in the head of the page, therefore no referece neccesary. By trial end error I thought this was the best move, do you agree?

My 2 issues remain:
1..How to dictate the file name rather than it defaulting to the .asp page name which generates the file
2..How to get rid od these annoying table borders when its viewed in Word as described in my initial post

TYIA

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
UnauthorizedAccessException when creating Word doc VerbatimBOT ASP.NET 2.0 Professional 2 November 3rd, 2008 05:56 PM
Copy text from 1 doc to other doc thru vba in word itchock Word VBA 2 December 29th, 2006 01:47 AM
Creating word doc. thru .dot or XML document manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 2 March 1st, 2006 06:18 AM
Creating word doc in ASP.NET ghari ASP.NET 1.0 and 1.1 Basics 1 December 10th, 2005 03:01 AM
Copy word to word doc. in VB vamshi Pro VB 6 1 March 24th, 2004 05:25 PM



All times are GMT -4. The time now is 11:51 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.