ขออภัยที่ไม่ได้ตรวจสอบไฟล์ก่อนส่งครับ
ล่าสุดตอนนี้ผมทำได้แล้วครับ ส่วนใหญ่ผมจะพยายามทำเองก่อนครับ
แต่มีเรื่องรบกวนอีกอย่างครับ
-ผมอยากแก้ไข ไดเร็กทอรี่ ที่เรียกไฟล์รูปให้เรียกจากที่เดียวกับไฟล์เอกสารได้มั้ยครับ คล้ายๆกับ code ที่save file pdf
Code: Select all
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ActiveWorkbook.Path & "\" & Range("B6").Value & " " _
& Range("b8").Value & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=True, _
OpenAfterPublish:=True
Code: Select all
With Range("F16:I28")
Set imgIcon = ActiveSheet.Shapes.AddPicture( _
Filename:="C:\Users\Mold\Desktop\PDF\111\" & k & ".jpg", LinkToFile:=False, _
SaveWithDocument:=True, Left:=.Left, Top:=.Top, _
Width:=.Width - 5, Height:=.Height)
End With
-codeด้านบนsaveไปยังไดเร็กทอรี่ที่ ไฟล์เอกสารอยู่
-codeด้านล่างดึงรูปจากไดเร็กทอรี่
ปัญหานี้จะเกิดขึ้นตอนนำไฟล์นี้ไปใช้เครื่องอื่น ตำแหน่งของไดเร็กทอรี่ที่เรียกไฟล์รูปจะเปลี่ยนไปต้องมาแก้codeทุกครั้งครับ
ควรจะแก้ไขหรือเพิ่มตรงส่วนไหนครับ
You do not have the required permissions to view the files attached to this post.