object propertyVal = typeof(Properties.Resources).GetProperty(templateName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public).GetValue(null, null);
string strPath = "/WordTemplateLog";
string folderPath = LogMsg.GetMapPath(strPath);
if (!Directory.Exists(folderPath))
{
Directory.CreateDirectory(folderPath);
}
string tempPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\MedalSoft\WordTemplateLog\temp.docx";//先保存到一个临时地方
File.WriteAllBytes(tempPath, (byte[])propertyVal);