none
Excel file save as PDF goes to different locations on OneDrive RRS feed

  • Question

  • Good Afternon,

    I'm trying to find any help referring to Excel 2013 and OneDrive. I've got application which creating kind of report and then saving it as PDF to OneDrive location. The problem is that application is dropping copy of PDF file to default location (see code below) but also sometimes you can find same copy in different random folders on L: drive. I'm sure there is no other code which making copy to those locations. I was wandering if it could be a problem with connection to a server? Your help will be much appreciated. Regards

    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "L:\WW\Business Development\ARC South\Official's Report Templates\" & ActiveSheet.Range("GL42").Value & ".pdf" _
       , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
       :=False, OpenAfterPublish:=False

    Monday, April 20, 2015 4:44 PM

All replies

  • Hello,

    Do you get copies in the Official's Report Templates subfolders?

    It looks like the following property value causes the issue:

    ActiveSheet.Range("GL42").Value
    Try to check the actual value passed to the ExportAsFixedFormat method.

    Monday, April 20, 2015 6:32 PM
  • Thanks a lot for reply, I've got copies of those reports in Official's Report Templates subfolder, but for some reason macro is dropping another copy (not always) into different location e.g. somewhere in ARC South, outside of "Official's Report Templates" subfolder. Value in GL42 is only part of the name of the file and contains name of employee. That part seems to be fine, especially that macro is attaching that file to email from the same location (Official's Report Templates) later. No idea where could be a problem.

    Monday, April 20, 2015 9:19 PM
  • Try to add log statements to see what path is used each time the ExportAsFixedFormat method is called.
    Monday, April 20, 2015 10:01 PM
  • Hi Novacus,

    Could you reproduce that issue in the new file? If so, please share this sample file on the OneDrive.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 21, 2015 7:41 AM
    Moderator