保存为pdf时出现问题-位置不正确

时间:2020-06-19 07:32:16

标签: pdf save-as

我也有一个问题,当我保存它时,它将保存mainc excel文件所在的位置。 请帮忙^^

2020-06-18T14:28:29,778 ERROR [main] client.ClientLocalResourceUtils$: Invalid URI ${liburis} in getUriFileStatuses()
2020-06-18T14:28:29,778 ERROR [main] session.MR3Session: Failed to start MR3 Session com.datamonad.mr3.api.common.MR3Exception: MR3SessionClient.startApplication()
Caused by: com.datamonad.mr3.api.common.MR3UncheckedException: Invalid URI ${liburis} in getUriFileStatuses()

1 个答案:

答案 0 :(得分:0)

与我自己解决此问题^^ filename:= filePath和文件名已被改正且有效。

Sub Save PDF
    Dim filePath As String
    Dim filename As String
    filePath = "C:\Users\lasha\Documents\"
    filename = Sheets("Form").Range("D2")
    Sheets("Form").Select
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:=filePath & filename, Quality:=xlQualityStandard, _
            IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
            True
    End Sub