open a form from anohter form and export the opene - InfoPath Dev
in

InfoPath Dev

open a form from anohter form and export the opene

Last post 02-02-2006 07:11 AM by dhtroy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-31-2006 07:41 AM

    open a form from anohter form and export the opene

    Hi to all,

    From one form I open another form by code (C#). I have to export the view from the opened form.

    The code is
    XDocument xDocPrevious = thisApplication.XDocuments.Open("c:\\openFile.xml", 1);
    DocPrevious.View.Export(Environment.GetFolderPath("C:\\test.mht", "MHT");

    It seems an error when the opened form is exported. The error is that the view isn't ready. What should I do?
  • 02-02-2006 07:11 AM In reply to

    • dhtroy
    • Not Ranked
    • Joined on 01-30-2006
    • USA
    • Posts 8

    Re: open a form from anohter form and export the opene

    Try adding a default wait value in between your XDocuments.Open call and the View.Export.

    The XDocument probably hasn't completed the transform of the page yet.

    Also, there maybe a property or method you can use that tells you the 'state' of a loading/loaded document, but you'll have to look for it, because I'm not 100% positive that InfoPath exposes this ...

    D.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.