How to change the XDocument.URI

M

maor110

I know, but for example the XDocument.IsDirty also is a read only property
and you can change it with the XDocument.SetDirty method.

(I don't want to see a: 'do you want to save 'Forumlar1' before close' when
the user close the programm without having saved the formular before)
 
S

Scott L. Heim [MSFT]

Hi Paul,

If you are merely trying to "force" close the form regardless of whether
the user has saved their data, you can use the following on a button's
click event:

- VBScript:
Dim objXDoc
Set objXDoc = Application.XDocuments(0)
Application.XDocuments.Close objXDoc
Set objXDoc = Nothing

- JScript:
var objXDoc = Application.XDocuments(0);
Application.XDocuments.Close(objXDoc);
objXDoc = null;

Keep in mind though, this does not save the data. If you want to "force" a
save in here as well, you will need to call the "Save" or "SaveAs" method.

Best regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

maor110

Thank you.

I now handle to complete save and exit stuff with my own toolbar.

But there are two little problems left.
First I need a event for customizing my toolbar after open the form. In the
form-onload and switchview events, you cannot access the custom toolbar (a
view bounded tollbar).
The second problem is the Xbutton - I disable all normal menus at the
beginning and if the user push the X there is no event where i can enable
them.

Somebody knows help?

Thanks in advance,
Paul Degenkolbe
 
B

Brühno

Hi,

I develop in Infopath, too and actually have exactly the same both
problems. Have you got any solutions yet? I would be very happy if you
share your knowledge with me in this case :)

Best regards,
Daniel Scholz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top