Hi all,
The premise here is that the user clicks a button in the ribbon, and the image is copied from the hidden location and pasted where desired in a table. But I want to make sure the image cannot be seen from where it is being copied.
What I came up with was - hiding the images by changing the brightness and contrast to 100% (is there a better way?) and bookmarking them so the macro knows the location when it copies and pastes it later.
The problem is that when it's pasted, the code I have to reset the brightness and contrast just gives me a gray box. I'm by no means a programmer, but I do have an idea of what to do to tweak code after recording a macro.
Any thoughts on how to make the pasted image display properly?
Thanks, EB
The premise here is that the user clicks a button in the ribbon, and the image is copied from the hidden location and pasted where desired in a table. But I want to make sure the image cannot be seen from where it is being copied.
What I came up with was - hiding the images by changing the brightness and contrast to 100% (is there a better way?) and bookmarking them so the macro knows the location when it copies and pastes it later.
The problem is that when it's pasted, the code I have to reset the brightness and contrast just gives me a gray box. I'm by no means a programmer, but I do have an idea of what to do to tweak code after recording a macro.
Code:
Public Sub promptVideo(control As IRibbonControl)
Selection.GoTo What:=wdGoToBookmark, Name:="video"
Selection.Copy
Application.GoBack
Selection.SelectRow
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.SelectCell
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.InlineShapes(1).PictureFormat.Brightness = 0.2
Selection.InlineShapes(1).PictureFormat.Contrast = 0.5
End Sub
Any thoughts on how to make the pasted image display properly?
Thanks, EB