Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reactive Extensions snippets - why no output? Pin
Kevin McFarlane25-Jan-10 4:26
Kevin McFarlane25-Jan-10 4:26 
QuestionIni file for setup project in VS2005 Pin
Sunshine Always25-Jan-10 2:04
Sunshine Always25-Jan-10 2:04 
AnswerRe: Ini file for setup project in VS2005 Pin
#realJSOP25-Jan-10 3:38
mve#realJSOP25-Jan-10 3:38 
QuestionRe: Ini file for setup project in VS2005 Pin
Sunshine Always12-Apr-10 0:19
Sunshine Always12-Apr-10 0:19 
Questionmenustrip dynamic items Pin
Zeyad Jalil25-Jan-10 1:46
professionalZeyad Jalil25-Jan-10 1:46 
AnswerRe: menustrip dynamic items Pin
Luc Pattyn25-Jan-10 1:48
sitebuilderLuc Pattyn25-Jan-10 1:48 
AnswerRe: menustrip dynamic items Pin
Harvey Saayman25-Jan-10 2:50
Harvey Saayman25-Jan-10 2:50 
QuestionWord Automation Problem Pin
cdpace25-Jan-10 1:42
cdpace25-Jan-10 1:42 
Hello Guys,

At work I am developing a new reporting system where this small application will generate the report from an XML file and then gather the data from a database and the process the report in WORD Format. Now after i developed this application and tested it on my development machine it worked compleetly fine. But when i put it into production it was always giving me the same error "Object not set to an instance of an object". After investigating more i found out that it was crashing when it was trying to query how many boookmars there are in the word document, I found out that the Document was not being opend.

This is my code below:


Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();


object filename = System.Configuration.ConfigurationSettings.AppSettings["ReportPath"].ToString() + @"\template\" + TemplateNode.Attributes["path"].Value;
object _readonly = false;
object isVisable = true;
object missing = System.Reflection.Missing.Value;


Microsoft.Office.Interop.Word.Document WordDocument = WordApp.Documents.Add(ref filename, ref missing, ref missing, ref missing);


This code is resulting in the Object "WordDocument" being null. Now the funny thing is that this works fine in my developemtn machinie but id dosent work correctly on the server.

My Development Machine = Windows XP

Server = Windows server 2003

Anonye has any ideas as i am lost?

Regards,
Christian Pace

AnswerRe: Word Automation Problem Pin
Luc Pattyn25-Jan-10 1:47
sitebuilderLuc Pattyn25-Jan-10 1:47 
GeneralRe: Word Automation Problem Pin
cdpace25-Jan-10 2:04
cdpace25-Jan-10 2:04 
GeneralRe: Word Automation Problem Pin
Luc Pattyn25-Jan-10 2:09
sitebuilderLuc Pattyn25-Jan-10 2:09 
GeneralRe: Word Automation Problem Pin
cdpace25-Jan-10 2:30
cdpace25-Jan-10 2:30 
GeneralRe: Word Automation Problem Pin
Luc Pattyn25-Jan-10 2:54
sitebuilderLuc Pattyn25-Jan-10 2:54 
QuestionAttempted to read or write protected memory - Vista and SQL Compact Edition Pin
Paul Unsworth25-Jan-10 0:38
Paul Unsworth25-Jan-10 0:38 
AnswerRe: Attempted to read or write protected memory - Vista and SQL Compact Edition Pin
Abhinav S25-Jan-10 2:04
Abhinav S25-Jan-10 2:04 
GeneralRe: Attempted to read or write protected memory - Vista and SQL Compact Edition Pin
Paul Unsworth25-Jan-10 2:07
Paul Unsworth25-Jan-10 2:07 
AnswerRe: Attempted to read or write protected memory - Vista and SQL Compact Edition Pin
#realJSOP25-Jan-10 3:40
mve#realJSOP25-Jan-10 3:40 
Questionform Color Pin
jojoba201025-Jan-10 0:21
jojoba201025-Jan-10 0:21 
AnswerRe: form Color Pin
daxfrost25-Jan-10 0:28
daxfrost25-Jan-10 0:28 
QuestionForm location Pin
jojoba201025-Jan-10 0:19
jojoba201025-Jan-10 0:19 
AnswerRe: Form location Pin
sanforjackass25-Jan-10 0:35
sanforjackass25-Jan-10 0:35 
Questionmy qcm project Pin
naghoumeh1425-Jan-10 0:07
naghoumeh1425-Jan-10 0:07 
QuestionRe: my qcm project Pin
monstale25-Jan-10 0:31
monstale25-Jan-10 0:31 
AnswerRe: my qcm project Pin
naghoumeh1425-Jan-10 1:07
naghoumeh1425-Jan-10 1:07 
GeneralRe: my qcm project Pin
monstale25-Jan-10 1:39
monstale25-Jan-10 1:39 

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.