1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| Sub MacroAltE()
' Recorded 09/11/2008
'
' Description:
' Copie pixels, résolutions, H et V dans fichier .txt
Dim sPath As String
Dim lngSizeWidth As Long, lngSizeHeight As Long
Dim lngResolutionWidth As Long, lngResolutionHeight As Long
Dim w As Double, h As Double
ActiveDocument.Unit = cdrMillimeter
'Set your directory or path here
sPath = "D:\ZZ Sauve JOUR\Document\SuperMacro\Sauve_variables\Scripts Corel\Pixels et Résolution.txt"
'Assign the needed data to variables
ActiveShape.GetSize w, h
With ActiveShape.Bitmap
lngSizeWidth = .SizeWidth
lngSizeHeight = .SizeHeight
lngResolutionWidth = .ResolutionX
lngResolutionHeight = .ResolutionY
End With
'Test if directory or path exits
If Dir(sPath) <> "" Then
Open sPath For Output As #1
Print #1, lngSizeWidth
Print #1, lngSizeHeight
Print #1, lngResolutionWidth
Print #1, lngResolutionHeight
Print #1, Round(w, 3)
Print #1, Round(h, 3)
Close #1
Else
MsgBox " Fichier I N E X I S T A N T ---->>> " & sPath, , "BitmapResolution"
End If
End Sub[ATTACH]142265[/ATTACH] |
Partager