Click here to Skip to main content
15,909,897 members
Home / Discussions / C#
   

C#

 
QuestionGenerics and the form designer in VS2005 Pin
Luis Alonso Ramos12-Jan-06 16:26
Luis Alonso Ramos12-Jan-06 16:26 
GeneralRe: Generics and the form designer in VS2005 Pin
Luis Alonso Ramos12-Jan-06 19:01
Luis Alonso Ramos12-Jan-06 19:01 
QuestionGenerate exe file from the C# program Pin
tadung12-Jan-06 15:04
tadung12-Jan-06 15:04 
AnswerRe: Generate exe file from the C# program Pin
Christian Graus12-Jan-06 15:12
protectorChristian Graus12-Jan-06 15:12 
GeneralRe: Generate exe file from the C# program Pin
tadung12-Jan-06 15:55
tadung12-Jan-06 15:55 
GeneralRe: Generate exe file from the C# program Pin
Christian Graus12-Jan-06 15:56
protectorChristian Graus12-Jan-06 15:56 
GeneralRe: Generate exe file from the C# program Pin
tadung12-Jan-06 15:58
tadung12-Jan-06 15:58 
QuestionSearch and Replace in Word Pin
CliffAnderson12-Jan-06 13:55
CliffAnderson12-Jan-06 13:55 
Any idea why I get a "An unhandled exception of type 'System.NullReferenceException' occurred in MyApp.exe. Additional information: Object reference not set to an instance of an object" on the last line of the following code? When I put WordApp.Selection in the Watch window, it says <undefined value="">. I copied this process right from the book. The app is early bound to Word.

public class ReplaceWord : IDisposable
{
private Word.Application WordApp=null;
object readOnly = false;
object isVisible = false;
object replaceAll = Word.WdReplace.wdReplaceAll;
object missing = System.Reflection.Missing.Value;

public ReplaceWord()
{
if (WordApp==null) WordApp = new Word.ApplicationClass();
}
public void SearchAndReplace( object fileName )
{
Word.Document aDoc = WordApp.Documents.Open(
ref fileName, ref missing,
ref readOnly, ref missing, ref missing,
ref missing,ref missing, ref missing, ref missing,
ref missing, ref missing, ref isVisible,
ref missing, ref missing, ref missing );
//Move selection to the beginning of doc.
Object unit = Word.WdUnits.wdStory;
Object extend = Word.WdMovementType.wdMove;
WordApp.Selection.HomeKey(ref unit, ref extend);



Cliff Anderson
Lockheed Martin Corp.
AnswerRe: Search and Replace in Word Pin
Nick Parker12-Jan-06 14:19
protectorNick Parker12-Jan-06 14:19 
QuestionDatabase Microsoft Access Pin
Sasuko12-Jan-06 12:36
Sasuko12-Jan-06 12:36 
AnswerRe: Database Microsoft Access Pin
Christian Graus12-Jan-06 12:49
protectorChristian Graus12-Jan-06 12:49 
GeneralRe: Database Microsoft Access Pin
Daniel Santillanes12-Jan-06 13:02
professionalDaniel Santillanes12-Jan-06 13:02 
GeneralRe: Database Microsoft Access Pin
Christian Graus12-Jan-06 13:07
protectorChristian Graus12-Jan-06 13:07 
GeneralRe: Database Microsoft Access Pin
Daniel Santillanes12-Jan-06 13:12
professionalDaniel Santillanes12-Jan-06 13:12 
AnswerRe: Database Microsoft Access Pin
pliu_200012-Jan-06 13:34
pliu_200012-Jan-06 13:34 
QuestionOptimization of unsafe code Pin
Robert Rohde12-Jan-06 12:26
Robert Rohde12-Jan-06 12:26 
AnswerRe: Optimization of unsafe code Pin
Christian Graus12-Jan-06 12:48
protectorChristian Graus12-Jan-06 12:48 
GeneralRe: Optimization of unsafe code Pin
Robert Rohde12-Jan-06 13:58
Robert Rohde12-Jan-06 13:58 
GeneralRe: Optimization of unsafe code Pin
Christian Graus12-Jan-06 14:01
protectorChristian Graus12-Jan-06 14:01 
QuestionWNetAddConnection2A & Web Services Pin
Guinness4Strength12-Jan-06 11:58
Guinness4Strength12-Jan-06 11:58 
AnswerRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak12-Jan-06 15:42
mveDave Kreskowiak12-Jan-06 15:42 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength13-Jan-06 11:37
Guinness4Strength13-Jan-06 11:37 
GeneralRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak13-Jan-06 15:12
mveDave Kreskowiak13-Jan-06 15:12 
GeneralRe: WNetAddConnection2A & Web Services Pin
Guinness4Strength14-Jan-06 10:28
Guinness4Strength14-Jan-06 10:28 
GeneralRe: WNetAddConnection2A & Web Services Pin
Dave Kreskowiak14-Jan-06 15:34
mveDave Kreskowiak14-Jan-06 15:34 

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.