VBA - Bild
Om man med VBA i Word vill infoga en bild på visst ställe eller ändra egenskap på vald bild vilka funktioner och liknande skall man använda?
Svara
Sv: VBA - Bild
Testade spela in ett macro och fick fram följande kod som jag modifierat lite....
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Sub RezisePicture() Dim StartSizeW, StartSizeH, RezisedW, RezisedH StartSizeW = Selection.InlineShapes(1).Width StartSizeH = Selection.InlineShapes(1).Height RezisedW = StartSizeW * 0.65 RezisedH = StartSizeH * 0.65 With Selection.InlineShapes(1) .Height = RezisedH .Width = RezisedW End With End Sub |
Svara
Sv:VBA - Bild
När man klistrar in en bild så skalar Word den automatiskt, hur kan man få reda på hur stor den är vid 100%?
/T
Svara
Sv: VBA - Bild
Kul att svara på sina egna inlägg.....
Googlade lite och hittade följande
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | '------------------------------------------------- 'Ändra storlek på skärmdump till 65% '------------------------------------------------- Sub RezisePicture() Application.ScreenUpdating = False If Selection.Type = wdSelectionInlineShape Then With Selection.InlineShapes(1) .ScaleHeight = 65 .ScaleWidth = 65 End With End If Application.ScreenUpdating = True End Sub |
Svara