Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

outlook web addins - Including custom javascript files in Office add-in deployment

I am creating a number of Office add-ins for Word and Outlook at the moment. As I an trying to keep the code manageable, I am using 3rd party js files as well as my own. Unfortunately, these extra files are not transferred and appear as unfound files errors when the add-in starts.

What am I doing wrong and what should I be considering when trying to solved this problem?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

After considering the project location, the web addresses, etc., it is required that the external javascript files (and additional html files) are present along side the manifest.xml when debugging. The taskplane references the javascript files relative to itself in the development location (srcaskpane) i.e.

    <script type="text/javascript" src="client.js"></script>

however to debug the add-in, the client.js file must also be in the project root beside the manifest.xml.

Obviously, the other option is to include the external javascript code in your taskpane.js :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...