Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: What would the c# equivalent of make_pair be Pin
leppie24-Nov-04 6:09
leppie24-Nov-04 6:09 
GeneralRe: What would the c# equivalent of make_pair be Pin
Nick Parker24-Nov-04 7:23
protectorNick Parker24-Nov-04 7:23 
GeneralDynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 10:59
john kuruvila23-Nov-04 10:59 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
DavidNohejl23-Nov-04 11:34
DavidNohejl23-Nov-04 11:34 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
Heath Stewart23-Nov-04 13:03
protectorHeath Stewart23-Nov-04 13:03 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
DavidNohejl23-Nov-04 11:44
DavidNohejl23-Nov-04 11:44 
GeneralDynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 10:56
john kuruvila23-Nov-04 10:56 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
Heath Stewart23-Nov-04 12:59
protectorHeath Stewart23-Nov-04 12:59 
If all you need to support was Word 2003, you can use the published Word 2003 XML Schema that you can download (as well as documentation) at http://www.microsoft.com/downloads/details.aspx?familyid=fe118952-3547-420a-a412-00a2662442d9&displaylang=en[^]. Generate XML through a variety of means (using the DOM with the System.Xml classes or using an XSLT using the System.Xml.Xsl classes) and - if you display the generated content in Internet Explorer and have Word 2003 installed - it should open up in Word.

If you need to support downl-level versions, I suggest you use XHTML (XML with a default namespace to mimic HTML for older browsers) with the following processor instruction at the top:
<?xml version="1.0">
<?mso-application progid="Word.Document"?>
This would be supported by Word 2000 and newer.

If you want to support older clients yet and generate binary content, then you'll have to use automation (generating an RCW (runtime callable wrapper) from the Word typelib usign VS.NET->Add Reference->COM or tlbimp.exe), which isn't safe in a multi-threaded server application like ASP.NET. You'd be responsible for thread safety.

If you must use that route, be sure to create an RCW (an "interop assembly") from the oldest typelib you want to support. Since Office components (and all COM servers should be written this way, though that's not always the case) are backwards compatible, they support older interfaces. You could even generate an RCW from a new typelib, but you must be sure not to use interfaces that are new to a version you might want to support.

Because this would be on a server you would most likely control, however, you should get some control over what version is installed.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 13:32
john kuruvila23-Nov-04 13:32 
GeneralCenter of screen Pin
AlexMartins23-Nov-04 10:16
AlexMartins23-Nov-04 10:16 
GeneralRe: Center of screen Pin
Luis Alonso Ramos23-Nov-04 10:38
Luis Alonso Ramos23-Nov-04 10:38 
GeneralRe: Center of screen Pin
Daniel Turini24-Nov-04 1:17
Daniel Turini24-Nov-04 1:17 
QuestionBenefits of SqlTypes? Pin
sixefftee23-Nov-04 9:51
sixefftee23-Nov-04 9:51 
AnswerRe: Benefits of SqlTypes? Pin
Heath Stewart23-Nov-04 12:48
protectorHeath Stewart23-Nov-04 12:48 
GeneralRe: Benefits of SqlTypes? Pin
Charlie Williams23-Nov-04 13:12
Charlie Williams23-Nov-04 13:12 
GeneralRe: Benefits of SqlTypes? Pin
Heath Stewart23-Nov-04 13:13
protectorHeath Stewart23-Nov-04 13:13 
GeneralC# Question Pin
QzRz23-Nov-04 9:19
QzRz23-Nov-04 9:19 
GeneralRe: C# Question Pin
Stefan Troschuetz23-Nov-04 9:57
Stefan Troschuetz23-Nov-04 9:57 
GeneralRe: C# Question Pin
Uwe Keim23-Nov-04 19:56
sitebuilderUwe Keim23-Nov-04 19:56 
GeneralInstalled network cards Pin
Einar Kvandahl23-Nov-04 7:38
Einar Kvandahl23-Nov-04 7:38 
GeneralRe: Installed network cards Pin
Heath Stewart23-Nov-04 12:45
protectorHeath Stewart23-Nov-04 12:45 
GeneralRe: Installed network cards Pin
Einar Kvandahl24-Nov-04 3:59
Einar Kvandahl24-Nov-04 3:59 
GeneralRe: Installed network cards Pin
Heath Stewart24-Nov-04 5:06
protectorHeath Stewart24-Nov-04 5:06 
QuestionMore-Automated Windows Forms Help? Pin
McClamm23-Nov-04 7:08
McClamm23-Nov-04 7:08 
AnswerRe: More-Automated Windows Forms Help? Pin
Heath Stewart23-Nov-04 8:47
protectorHeath Stewart23-Nov-04 8:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.