Excel VBA export to Sharepoint RRS feed

  • Question


    hello team-

     the following VBA exports "myfile.xml" from within an excel file to "mydocuments" folder on my sharepoint server. It exports perfectly as long as there is no existing "myfile.xml" already in the destination folder. It produces an error where there is a previous incidence of "myfile.xml" already in the destination folder..


    Can somebody offer me some VBA to overwrite the previous instance of "myfile.xml" with the current file without prompting the user? 


    I have read/write administrator rights on the sharepoint so it's not a rights access issue on sharepoint (I get the same error when trying to export to my local c:\  as well)



    Code Block

    Sub ExportXML2Sharepoint()

    ActiveWorkbook.XmlMaps("XMLMap").Export URL:= _
    End Sub



    Code Block

    Run time error '-2147467259 (80004005)'

    Method 'Export' of object 'XMLMap' failed




    Thanks for any help. Conor


    Tuesday, December 18, 2007 3:24 PM