Question

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 reference should be dropped.

Does anyone know how to do this?

Thanks!!

badPanda

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top