Hey All,
I'm doing something to make this fairly basic thing harder than it should
be. At the end of the code below, while no exceptions are thrown and I'm
getting object references, Word doesn't show having any active or even open
documents. Anyone see what I don't???
object ostrFileName = @"c:\temp\MailLabel5160.doc";
object oboolFalse = false;
object oboolTrue = true;
object ostrNullString = "";
object ointZero = 0;
object owdFormat = Word.WdOpenFormat.wdOpenFormatAuto;
Word.Application wrdLabelMerge = new Word.ApplicationClass();
Word.Document docLabel = wrdLabelMerge.Documents.Open(ref ostrFileName, ref
oboolFalse, ref oboolFalse, ref oboolFalse,
ref ostrNullString, ref ostrNullString, ref oboolFalse, ref
ostrNullString, ref ostrNullString,
ref owdFormat, ref ostrNullString, ref oboolFalse);
docLabel.MailMerge.OpenDataSource(@"C:\temp\Addres sExample.csv",ref
owdFormat,ref oboolFalse,
ref oboolFalse, ref oboolTrue, ref oboolFalse, ref ostrNullString, ref
ostrNullString,
ref oboolFalse, ref ostrNullString, ref ostrNullString, ref
ostrNullString, ref ostrNullString, ref ostrNullString);
TIA,
John