将文本框添加到Excel宏生成的PDF

时间:2018-05-02 06:55:02

标签: excel vba pdf

我有一个宏来生成Excel的Excel。如何在特定位置的PDF中添加文本框?

以下是我的代码:

Sub Export()
Dim wsA As Worksheet
Dim wsB As Workbook
Dim strPath As String
Dim myFile As Variant

Set wbA = ActiveWorkbook
Set wsA = ActiveWorksheey

strPath = wbA.Path
If strPath = "" Then
strPath = Application.DefaultFilePath
End If
strPath = strPath & "\"

myFile = Application.GetSaveAsFilename _
(FileFilter:="PDF Files (*.pdf), *.pdf", _
Title:="Select Folder and FileName to save")

If myFile <> "False" Then
wsa.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=myFile, _
Quality:=xlQualityStandard,_
IncludeDocProperties:=True,_
IgnorePrintAreas:=False,_
OpenAfterPublish:=True

End If
End Sub

谢谢!

0 个答案:

没有答案