justuptou
03-04-2017, 11:02 AM
I am using Excel VBA coding to generate a winword report with photos.
Before close the file, I have to compress all images in files ( 96 ppi ) and save the file by coding,
Could anyone can help me to provide the coding ?
Sub CompressPics()
With Application.CommandBars.FindControl(ID:=6382)
SendKeys "%A%W{Enter}"
.Execute
End With
End Sub
Someone provide me above coding, but it is not work in Excel.
Result is "It needs me to select 96 ppi and press Enter, I hope it can default automatics" and
"The winword file size is still over 50 mb. it should be changed to around 800 kbs"
Before close the file, I have to compress all images in files ( 96 ppi ) and save the file by coding,
Could anyone can help me to provide the coding ?
Sub CompressPics()
With Application.CommandBars.FindControl(ID:=6382)
SendKeys "%A%W{Enter}"
.Execute
End With
End Sub
Someone provide me above coding, but it is not work in Excel.
Result is "It needs me to select 96 ppi and press Enter, I hope it can default automatics" and
"The winword file size is still over 50 mb. it should be changed to around 800 kbs"