¼g¤@Ó¥t¦s·sÀɪº¥¨¶°¡A¦ý¬O»Ýn.pdf file¡A¨º»òÀ³«ç§ï¼g¡H
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¼g¤@Ó¥t¦s·sÀɪº¥¨¶°¡A¦ý¬O»Ýn.pdf file¡A¨º»òÀ³«ç§ï¼g¡H
¦pªGµª¡§¬O¡¨¡A¥¿±`¹B§@¡A¦ý¬Oµª¡§§_¡¨·|¸õ¨ì°£¿ù¼Ò¦¡¡A½Ð°Ýµª¡¨§_¡§µ¥¦p°£®ø¡A«ç»ò½s¼g¡H
Sub SaveAS()
'
' ¥¨¶°1¥¨¶°
'
¬O§_¥t¦s·sÀÉ = InputBox("¬O§_¥t¦s·sÀÉ? ¬O¡GY, §_¡GN", , "Y")
File = Application.Range("D6")
Name = Application.Range("M7")
ActiveWorkbook.SaveAs Filename:=File & "-" & Name & ".xlsm"
End Sub |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
·PÁ¡I
¥t¤@Ó°ÝÃD¡A¦pªGÀɮצWºÙ¤w¸g¦s¦b¡Aµª"¬O"´N¦p±`»\¤Fªº¡A¦ýµª"§_"¤S«ç¼g©O¡H |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 2# kimbal
·PÁ¡I
¥t¤@Ó°ÝÃD¡A¦pªGÀɮצWºÙ¤w¸g¦s¦b¡Aµª"¬O"´N¦p±`»\¤Fªº¡A¦ýµª"§_"¤S«ç¼g©O¡H |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ Blade
¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2012-12-18 11:12 
§Ú²{®Éªº½s½X¬O³o¼Ë
Sub SaveAS()
'
' Module2 Module
' invno
'
ActiveWorkbook.Save
¬O§_¥t¦s·sÀÉ = MsgBox("¬O§_¥t¦s·sÀÉ?", vbYesNo)
If ¬O§_¥t¦s·sÀÉ = vbYes Then
File = Application.Range("D6")
SNo = Application.Range("L7")
Name = Application.Range("M7")
ChDir "D:\Account book\INV"
ActiveWorkbook.SaveAS Filename:=File & "_" & SNo & "_" & Name & ".xlsm"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=File & "_" & SNo & "_" & Name & ".pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End If
End Sub |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 7# GBKEE
·PÁ¡I¦¨¥\¤F¡C
ìÀɦWºÙ¬Oinv.xlsm
·í§Ú§¹¦¨¸ê®Æ®É
¦pªG§Ú¦P®É·Q¯d "xlsm" & "pdf"
¤§«á·|¦³¨âÓÀÉ®×
INV11345-©P¨ÌÀM.xlsm
INV11345-©P¨ÌÀM.pdf
¬O§_¥[¤J "¬õ¦âªº" ?
¥t¥~xNameªºx¬O§_¦³·N«äªº«ü¥Ü¡A¥ÎName¥i¥H¶Ü¡H
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"
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 |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 9# GBKEE
·PÁ¡A¤Q¤À¦¨¥\¡C
§ÚªºINV File¬O©ñ©óD:\Account book\INV\INV.xlsm
§Ú¦Û¦æ¥[¤U¡§¬õ¦â¡§ªºn¨D¡A¦ý¬O¥t¦s.pdf«á¡Afile¨ÌµM¶]¤F¥h¡§§Úªº¤å¥ó¡¨¸ê®Æ§¨¤º¡A½Ð°Ý§Ú¬O§_©ñ¿ù¤F«ü¥Oªº¦ì¸m©O¡H
¥t¤@Ó°ÝÃD¡A¤µ¤Ñµo²{¤jÀY½¼ªº¦P¨Æ¡A¨C¦¸µoinvoiceªº®ÉÔ¡A¸g±`§Ñ°O§ó§ïinvoice no¡A©Ò¥H¦P¤@Óinvoice no¸g±`¥X²{©ó¤£¦Pªº«È¤á¦WºÙ¸Ì¡C
¨C¦¸µo³æ®É¡A¥t¦s«á³£¬O®æ¦¡ INV12345_·|û½s¸¹1_«È¤á¦WºÙ1.pdf
¨ì¤F¤U¤@±i³æ®É¡A¦o¤S§Ñ¤F§ó§ïINV12345¡A¦]¦¹·|¥X²{ INV12345_·|û½s¸¹2_«È¤á¦WºÙ2.pdf
½Ð°Ý¦³¨S¦³«ü¥O¤èªk¡A¦b¥t¦s®É¡A¥u°w¹ïInvoice noªº«½Æ§@´£¥Ü
'File_Name = xFile & "-" & xName & ".pdf"
ChDir "d:\Account book\INV\"
Do
File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name) |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 11# GBKEE
À³¸Ó¬O¡G
µo²¼½s¸¹_·|û½s¸¹_·|û¦WºÙ
INV12345_1122_©P¨ÌÀM.pdf (³oµo²¼¦¨¥\¦C¦L¤Î¦sÀÉ)
¦ý·í¥t¤@¦ì¦P¨Æ¶}·sµo²¼®É¡A¦o¤S§Ñ¤F§ó§ïµo²¼½s¸¹¥u§ó·s¤F·|û¸ê®Æ¦ý¤Sª½±µ¦C¦L¤Î¦sÀÉ
«K·|¥X²{¤F¬Û¦Pªºµo²¼½s¸¹¦p¤U¡G
INV12345_1155_¦¶¤d³·.pdf
·|û¦¬¶O¸ê®Æ§ó·s¤F¡A¦ý¬Oµo²¼½s¸¹«½Æ¤F
·|û½s¸¹¤Î·|û¦WºÙ¬O·|±`±`«½Æªº¡A¦ýµo²¼½s¸¹¤£¯à«½Æ¡A©Ò¥HÀɦW¯à¤£¯à¥u°w¹ïµo²¼½s¸¹¤£¯à«½Æ§@¥X´£¥Ü |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 13# GBKEE
§Ú¥[¤F¦b¡§¬õ¦â¡¨¨º³B¡A¤£¯à¦¨¥\¹B§@¡A§Ú¬O§_©ñ¿ù¦ì¸m©Î¥´¿ù¬Æ»ò¡H
Option Explicit
Sub Print_and_SavePDF()
Dim File_Name As String, xFile As String, xSNo As String, xName As String
xFile = Range("D6")
xSNo = Range("L7") 'xSNo «K¬Oµo²¼½s¸¹ªº¦ì¸m
xName = Range("M7")
File_Name = xFile & "_" & xSNo & "_" & xName & ".pdf"
ActiveWorkbook.Save
ChDrive "D:\"
If Mid(CurDir, 1, 1) <> "d" Then ChDrive "d:\"
ChDir "d:\Account book\INV\"
If Dir("d:\Account book\INV\" & " xSNo " & "*.pdf ")<> "" Then
MsgBox "µo²¼½s¸¹ ¤w¶}¥X"
Exit Sub
Do
File_Name = InputBox("¥t¦s·sÀÉ", "[ÀɮצsÀÉ]", File_Name)
If File_Name = "" Then
Exit Sub
Else
If Dir(File_Name) <> "" Then
If MsgBox("¡iª`·N¡jÀɮצWºÙ¤w¸g¦s¦b¡C¬O§_nÂл\¥¦¡H¦pÂл\¥¦¸ê®Æ±N·|³Q§ó·s¡C", vbYesNo) = vbYes Then
Exit Do
Else
File_Name = ""
End If
End If
End If
End If
Loop While Not UCase(File_Name) Like "*.PDF"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=xFile & "_" & xSNo & "_" & xName & ".pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
Range("N13").Select
End Sub |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 15# GBKEE
¦¨¥\¹B¦æ¡A¦ý¬O«½Æ µo²¼½s¸¹ ¨S¦³³Q´£¥Ü |
|
|
|
|
|
|
- ©«¤l
- 26
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 34
- ÂI¦W
- 0
- §@·~¨t²Î
- OSX
- ³nÅ骩¥»
- OSX
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2012-12-16
- ³Ì«áµn¿ý
- 2014-2-7
|
¦^´_ 17# GBKEE
´ú¸Õ¤F´X¦¸¡A¨Ì¤@¼Ë¡A¬Û¦Pªºµo²¼½s¸¹¥i¥H«½Æ¦sÀÉ
INV12345_1122_©P¨ÌÀM.pdf
INV12345_1123_§õ¤lÀs.pdf
INV12345_1124_¦¶¥¿©_.pdf
·PÁª©¤j:D
¥Ñ©óµo²¼½s¸¹¬O¤H¥´Áä¤Jªº¡A¦]¦¹¥X¿ù¬O¸g±`µo¥Í¡C
¦pªG´«¥t¤@Ӥ覡¡A¥[¤J¦Û°Ê½s¸¹¡A©óÀx¦s®æ¤º¡A§Y¬O¨C¦¸¥t¦s·sÀÉ«á¡A³£·|¸õ¤@Ó·sªº½s¸¹¥X¨Ó¡A«KªÖ©w¤£·|¥X¿ù¡C |
|
|
|
|
|
|