加载Visio时加载错误 - 无法加载XXXX加载项。指数数组的边界之外 [英] Error when loading Visio Add In - Unable to load the XXXX Add-In. Index was outside the bounds of the Array

查看:502
本文介绍了加载Visio时加载错误 - 无法加载XXXX加载项。指数数组的边界之外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我已经生成了MS Visio加载项并安装了它。 加载Visio 2016时,我收到错误'无法加载XXXX加载项。 索引超出了数组的范围,并且加载项未加载到Visio中。 你可以帮我解决这个
吗? 如果您需要任何进一步的信息,请告诉我。



我安装了Visio 2016 MSO(64位,版本16.0.4738.1000)和Visual Studio 2010(64位) ,Windows 7 Professional(64位,版本6.1.7601)上的版本10.0.40219.1 SP1Rel)






代码段:



public void OnConnection(对象应用程序,Extensibility.ext_ConnectMode connectMode,对象addInInst,ref System.Array自定义)

< span style ="white-space:pre"> {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;试试
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; mapXMLToVisio = new MyMapXMLToMicrosoftVisio();

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; applicationObject = application;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.visioApplication = applicationObject as Microsoft.Office.Interop.Visio.Application;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; addInInstance = addInInst;

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; }¥b $ b  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; catch(例外e)

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; {

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; MessageBox.Show("无法加载XXXX加载项:"+ e.Message);

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; }¥b $ b  &NBSP; &NBSP; &NBSP; }



解决方案

您好,


此论坛主要用于讨论IT专业人员的一般问题,评论和讨论Visio中。您的问题主要是为Visio开发加载项。为了帮助您更好地解决问题,我建议您提出问题 

Office for developer
 或  Office的Visual Studio工具( VSTO)论坛寻求帮助。你可能会收到更多有用的回复。


此外,请记得将此回复标记为答案。您的操作将帮助我们关闭该主题。这将使所有面临类似问题的社区成员受益。非常感谢您的贡献。


希望您能顺利解决问题。


最诚挚的问候,


草本植物


Hi,

I have generated MS Visio Add-In and installed it.  When loading the Visio 2016, I'm getting error 'Unable to load the XXXX Add-In.  Index was outside the bounds of the Array', and the Add-In is not loaded in the Visio.  Can you help me to resolve this?  Let me know if you need any further information.

I have installed Visio 2016 MSO (64-bit, version 16.0.4738.1000) and Visual Studio 2010 (64-bit, version 10.0.40219.1 SP1Rel) on a Windows 7 Professional (64-bit, version 6.1.7601)


Code snippet :

public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)
{
            try
            {
                mapXMLToVisio = new MyMapXMLToMicrosoftVisio();
                applicationObject = application;
                this.visioApplication = applicationObject as Microsoft.Office.Interop.Visio.Application;
                addInInstance = addInInst;
            }
            catch (Exception e)
            {
                MessageBox.Show("Unable to load the XXXX Add-in: " + e.Message);
            }
        }

解决方案

Hi,

This forum is mainly used to discuss general questions, comments and discussions for IT Professionals on Visio. Your question is mainly about developing add-in for Visio. To help you better resolve the issue, I suggest you ask questions  at Office for developer or Visual Studio Tools for Office (VSTO) Forum for help. You may get more helpful replies there.

In addition, please remember to mark this reply as answer. Your action will help us close the thread. It will benefit all community members who are facing similar issues. Your contribution is highly appreciated.

Hope you could resolve the issue smoothly.

Best Regards,

Herb


这篇关于加载Visio时加载错误 - 无法加载XXXX加载项。指数数组的边界之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆