The code I had a hard time understanding
The below code didn’t compile during a .NET 1.1 to 4 migration.
Downstream code:
Word.Document document = app.Documents.Add(ref FileName, ref missing, ref missing, ref missing);
Upstream code (6 layers up!):
string filename = Path.Combine(ConfigurationSettings.AppSettings["MSWordTemplateDirectory"], (string)status["CoverLetter"]);
And somewhere in the middle:
public bool GenerateLetter(Word.Application app, DataRow row, object FileName, object FilePathAndName)
Afterwards the code is this
Downstream code:
Word.Document document = app.Documents.Add(ref templateFileName, ref missing);
Upstream code (6 layers up!):
templateFileName = Path.Combine(ConfigurationSettings.AppSettings["MSWordTemplateDirectory"], (string)status["CoverLetter"]);
And somewhere in the middle:
public bool GenerateLetter(Word.Application app, DataRow row, object templateFileName, object documentFileName)
Coincidentally, parameters are now all lowercase.
–jeroen