¼g¤@Ó¥t¦s·sÀɪº¥¨¶°¡A¦ý¬O»Ýn.pdf file¡A¨º»òÀ³«ç§ï¼g¡H
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 4# Blade
¸Õ¸Õ¬Ý- Option Explicit
- Sub PrintPDF()
- Dim File_Name As String, xFile As String, xName As String
- xFile = Range("D6")
- xName = Range("M7")
- File_Name = xFile & "-" & xName & ".pdf"
- Do
- File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
- If File_Name = "" Then
- Exit Sub
- Else
- If Dir(File_Name) <> "" Then
- If MsgBox("ÀɮצWºÙ¸g¦s¦b,Âл\¥¦", vbYesNo) = vbYes Then
- Exit Do
- Else
- File_Name = ""
- End If
- End If
- End If
- Loop While Not UCase(File_Name) Like "*.PDF"
- Application.DisplayAlerts = False
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- xFile & "-" & xName & ".pdf", Quality:=xlQualityStandard, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
- Application.DisplayAlerts = True
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 8# Blade
Name ,File ¬OVBA¨Ï¥ÎªºÃöÁä¦r ÅܼÆ,µ{§Ç¦WºÙnÁ×§K¨Ï¥Î- Option Explicit
- Sub PrintPDF()
- Dim File_Name As String, xFile As String, xName As String
- xFile = Range("D6")
- xName = Range("M7")
- File_Name = xFile & "-" & xName & ".xlsm"
- 'File_Name = xFile & "-" & xName & ".pdf"
- Do
- File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
- If File_Name = "" Then
- Exit Sub
- Else
- If Dir(File_Name) <> "" Then
- If MsgBox("ÀɮצWºÙ¸g¦s¦b,Âл\¥¦", vbYesNo) = vbYes Then
- Exit Do
- Else
- File_Name = ""
- End If
- End If
- End If
- 'Loop While Not UCase(File_Name) Like "*.XLSM" 'UCase(File_Name) ¤j¼g *.XLSM
- Loop While Not LCase(File_Name) Like "*.xlsm" 'LCase(File_Name) ¤p¼g *.xlsm
- Application.DisplayAlerts = False
- ActiveWorkbook.SaveAs Filename:=File_Name
- File_Name = Replace(LCase(File_Name), "*.xlsm", ".dbf") '°ÆÀɦW´À´«¬° "dbf"
- ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
- xFile & "-" & xName & ".pdf", Quality:=xlQualityStandard, _
- IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
- Application.DisplayAlerts = True
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|