How to embedd Word 2007 document in ASP.NEt project -


i have neat class able mergefields within word document based on datarow object containing data require turn word 2007 docx template real word document data embedded inside word document, , using openxml (forget interop!). that's working me. however, having royal pain template loaded asp.net (.net2) project in visual studio 2005. everytime think i've "embedded" word document project, when try , access it, exception ...

value cannot null.

parameter name: template file not exists.

this error appears resource project (compiled in vs2008) dll file checks existance of file before continues. know that's cause of problem why fileinfo.exists false, when know file there!? file in same server project resides, in different location project.

so question should say, why fileinfo.exists returns false time.

never less, need store word document inside project itself, other need know how embedd word document inside asp.net project keep "contained" within same 1 solution , fileinfo recognise exist.

thank you

i found it!

it adding file existing project using add existing ...

i placed file inside folder within project (any folder) , referencing ...

    system.io.file.exists(server.mappath("feedbackformtemplate.docx")); 

this generates full path , filename extension ready used elsewhere in project.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -