اذهب الي المحتوي
أوفيسنا

كود حفظ ورقه عمل


الردود الموصى بها

الاخوة الاعزاء 

يوجد ملف مرفق به كود حفظ الورقه النشطه الي pdf ولكن اريد تغير مسار الحفظ الي ملف بعيد عن الملف وعدم ظهور قائمه الحفظ

عند الضغط علي زر الحفظ يقوم بحف الملف في مسار اخر في :D

بدون ظهور قائمه الحفظ

شكرا مقدماsave to pdf.xlsm

رابط هذا التعليق
شارك

السلام عليكم

قم بوضع مسار الذي يتم حفظ الملفات بين الاقواس  الملونة بالكود ادناه

 

Sub PDFActiveSheet()
Dim ws As Worksheet
Dim strPath As String
Dim myFile As Variant
Dim strFile As String
On Error GoTo errHandler

Set ws = ActiveSheet

strTime = Format(Now(), "yyyy-mm-dd")

strFile = "E:\access\dox" & "\" & ws.Name & "_" & strTime & ".PDF"

    ws.ExportAsFixedFormat _
    Type:=xlTypePDF, _
    Filename:=strFile, _
    Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, _
    OpenAfterPublish:=False, _
    From:=1, _
    To:=2

exitHandler:
    Exit Sub
errHandler:
    MsgBox "Could not create PDF file"
    Resume exitHandler

End Sub
تم تعديل بواسطه shreif mohamed
  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information