office2010 hata almazsan 2007 böyle bir hata alıyorum sebebi nedir.
Sheets("GELENEVRAK").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Klasor & "\GELEN EVRAK KAYIT " & Format(Now, "yyyymmdddd hhmmss") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Sheets("GELENEVRAK").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Klasor & "\GELEN EVRAK KAYIT " & Format(Now, "yyyymmdddd hhmmss") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Kod:
Private Sub cmdarşiv_Click()
Sheets("GELENEVRAK").PageSetup.Orientation = xlLandscape
Sheets("GELENEVRAK").PageSetup.Zoom = 77
Sheets("GELENEVRAK").PageSetup.RightHeader = "HALKAPINAR SOSYAL YARDIMLAŞMA VE DAYANIŞMA VAKFI BAŞKANLIĞI GELEN EVRAK LİSTESİ"
Sheets("GELENEVRAK").PageSetup.LeftFooter = Format(Date, "dd/mm/yyyy")
Dim oWSHShell As Object
sor = MsgBox("ARŞİVLEME İŞİ YIL SONU OLARAK YAPILMALIDIR." & vbLf & "AKSİ TAKDİRDE HATALI İŞLEM YAPILMIŞ OLACAKTIR.", vbYesNo + vbInformation, "BİLDİRİ")
If sor = vbNo Then Exit Sub
sor = MsgBox("GELEN EVRAK LİSTESİ ARŞİVLEME YAPILSINMI?" & vbLf & " ARŞİVLEME İŞLEMİ SONUCU TÜM VERİ SIFIRLANACAKTIR!", vbYesNo + vbInformation, "BİLDİRİ")
If sor = vbNo Then Exit Sub
Set oWSHShell = CreateObject("WScript.Shell")
Klasor = oWSHShell.SpecialFolders("Desktop")
Set oWSHShell = Nothing
Sheets("GELENEVRAK").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Klasor & "\GELEN EVRAK KAYIT " & Format(Now, "yyyymmdddd hhmmss") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Sheets("GELENEVRAK").Range("A2:H" & Rows.Count).ClearContents
End Sub