SaveAs

S

Stacey

I created an InfoPath form and want to save it to our network. I tried the
SaveAs function CTRL1337_5::OnClick(eventObj)
{
XDocument.SaveAs("\\stlabcfil002\ABC_MSG$\CNS\Network Implementation\Work
Order Repository");
}

I am getting the error msg "access denied"
I have researched the SaveAs function, and I am not able to find anything
that works.
If someone could please give me the exact code, I would really appreciate
it.

Thank you,
Stacey Nafe-McBeth

If someone could please give me the exact code, I would really appriciate it.
 
M

Madhur

Stacey said:
I created an InfoPath form and want to save it to our network. I
tried the SaveAs function CTRL1337_5::OnClick(eventObj)
{
XDocument.SaveAs("\\stlabcfil002\ABC_MSG$\CNS\Network
Implementation\Work Order Repository");
}

I am getting the error msg "access denied"
I have researched the SaveAs function, and I am not able to find
anything that works.
If someone could please give me the exact code, I would really
appreciate it.

Thank you,
Stacey Nafe-McBeth

If someone could please give me the exact code, I would really
appriciate it.

Your code will be correct since you are not getting
any exception but access denied error.
See if the user logged in infopath have the required access to the resource.
 
S

Stacey

Madhur,
Thank you for your response. I am the one filling out the form and have
full access to the file. I have also added full trust to the form.

Any other ideas??


Your code will be correct since you are not getting
 
L

Laurie_Marsh

When you publish the form with full trust you need a digital signature. Then
the file operations will be allowed. However, during development you need to
copy the following lines into a file called register.js, fix the path to
match your project, save the file, then double-click on the file to execute
it. Then you won't get errors on the file operations.

oApp = WScript.CreateObject("InfoPath.ExternalApplication");
strAbsolutePath = "C:\\marsh_QualityView\\manifest.xsf"
oApp.RegisterSolution(strAbsolutePath,"overwrite");
 

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