开发者

How to programmatically open Microsoft Infopath in C#?

开发者 https://www.devze.com 2023-01-04 14:04 出处:网络
I need to provide the equivalent of a hyperlink to open a new infopath form within my UI. However, that is all that the button should do - open the correct form by filepath, in InfoPath, and then the

I need to provide the equivalent of a hyperlink to open a new infopath form within my UI. However, that is all that the button should do - open the correct form by filepath, in InfoPath, and then the ref开发者_运维百科erence should be dropped.

Does anyone know how to do this?

Thanks!!

badPanda


void mDisplayForm_Click(object sender, EventArgs e)
    {
        int count = 0;
        foreach (ToolStripMenuItem template in mDisplayForms)
        {
            if (sender.ToString() == template.Text)
            {
                Process infoPath = new Process();
                infoPath.StartInfo.FileName = "InfoPath.exe";
                infoPath.StartInfo.Arguments = templates[count];
                infoPath.Start();
                count++;
            }
        }
    }

This is the code I used to solve the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消