Export XML - Getting error password protected

D

Darren

I created the following function to export a report as
XML. Everything works fine until I Lock project for
viewing in VBA. Then I get the Reserved Error 2950. I
have read what that error is, but I know my file name and
path are valid and I only get the error when I Lock
Project for viewing.

Please help

---
Public Function ExportXML() As Boolean
On Error GoTo Err_ExportXML

ExportXML = False
Application.ExportXML
acExportReport, "Report", "C:\Report.xml", "C:\Report.xsd"
, "C:\report.xsl"

ExportXML = True
Exit Function
Err_ExportXML:
MsgBox Err.Description & " : " & Err.Number
ExportXML = False
Exit Function
End Function
 

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