我有一堆图像,我想将特定的图片样式应用于-Word 2010中显示的第四个图像:
我有一个宏,它将遍历所有图像,但是需要知道shadow.type的可能性。
真正有用的是通过视觉示例对将用于每种图片样式的命令进行引用。
我没有VBA,因此无法检查图片的元素。我已经尝试了各种msoShadowxx,但这没用。
在视觉示例方面是否有很好的参考,还是每种图片风格的设置都有参考?还是用于第4种图片样式的设置(如此处的屏幕截图所示)?
这是我用来遍历所有图片的宏代码。
Sub BorderMacroshadow()
Dim oInlineShp As InlineShape
For Each oInlineShp In ActiveDocument.InlineShapes
With oInlineShp
.Line.Weight = 1
.Line.ForeColor.RGB = vbBlack
.Shadow.Type = msoShadow14
End With
Next
End Sub
已添加
仔细查看msoShadow的参考文献,可以发现它是指Picture Effects,Shadows“对话框”,而不是“ Picture Styles”,我认为它除其他元素外还使用了msoShadow的某些元素。
因此,我正在寻找复制第四个“图片样式”所需的元素(请参见截图)。还没找到。
答案 0 :(得分:0)
//Inject the object mapper because you don't want to retreive an "Object"
@Inject
ObjectMapper objectMapper;
@PUT
//The PUT endpoint retrieves a plain object
public Response update(Object object){
//Now we determine the concrete type of the object by using reflection
ParameterizedType p = (ParameterizedType) getClass().getGenericSuperclass();
Class<DTO> clazz = (Class<DTO>) p.getActualTypeArguments()[0];
//Pass the object and the determined type to the objectmapper
DTO dto = objectMapper.convertValue(object, clazz);
//Now call an abstract method that deals with the object in you concrete class
updateDto(dto);
}
protected abstract Response updateDto(DTO dto);
枚举是一组预设。这些功能区不一定在功能区的图库中使用。
为了确定任何阴影格式的设置,请使用msoShadowType
可用的各种属性,例如Shape.Shadow
,Transparency
,Size
。在用户界面中,可以在功能区上的“图片样式”组的“图片效果”,“阴影”,“阴影选项”中看到它们。
要以编程方式确定/设置它们,请参见以下代码示例。请注意,Blur
不是一个属性,而是Angle
和OffsetX
的组合。
OffsetY