Created
May 31, 2017 08:57
-
-
Save Talha-T/57ea8566119d6d8d905262de3617ad47 to your computer and use it in GitHub Desktop.
Makro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) | |
If Item.Attachments.Count < 1 Then Exit Sub | |
Dim app As New Excel.Application | |
app.Workbooks.Open ("C:\Users\CADCAM\Desktop\Kesim Takip Listesi.xlsx") | |
Dim dosyaAdı As String | |
dosyaAdı = Item.Attachments(1) | |
Dim isim, kalınlık, adet As String | |
' elevatör ara oluk(2mm 4 adet) | |
Dim parantez As Integer | |
parantez = InStr(dosyaAdı, "(") | |
isim = Mid(dosyaAdı, 1, parantez - 1) | |
Dim sonrakiBoşluk As Integer | |
sonrakiBoşluk = InStr(parantez, dosyaAdı, " ") | |
kalınlık = Mid(dosyaAdı, parantez + 1, sonrakiBoşluk - 1 - parantez) | |
Dim kapamaParantezi As Integer | |
kapamaParantezi = InStr(dosyaAdı, ")") | |
adet = Mid(dosyaAdı, sonrakiBoşluk + 1, kapamaParantezi - sonrakiBoşluk - 1) | |
Dim başlangıç As Integer | |
başlangıç = Excel.Cells(2, 6) | |
Excel.Cells(başlangıç, 1) = isim | |
Excel.Cells(başlangıç, 2) = kalınlık | |
Excel.Cells(başlangıç, 3) = adet | |
Excel.Cells(başlangıç, 4) = Now | |
Excel.Cells(2, 6) = başlangıç + 1 | |
Excel.Calculate | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment