主要利用visio开发者模式,在没有开发帮助文档的情况下,实现对visio文件的处理

 

 

Sub Macro3()

\’Enable diagram services
Dim DiagramServices As Integer
DiagramServices = ActiveDocument.DiagramServicesEnabled
ActiveDocument.DiagramServicesEnabled = visServiceVersion140 + visServiceVersion150

Application.ActiveWindow.SelectAll

\’Restore diagram services
Dim UndoScopeID1 As Long
UndoScopeID1 = Application.BeginUndoScope(“填充颜色”)

For Each ItemFrom In Application.ActiveWindow.Page.Shapes
Set vsoCharacters = ItemFrom
vsoCharacters.Characters.Text = “okokokokokokokok”

vsoCharacters.CellsSRC(visSectionObject, visRowFill, visFillForegnd).FormulaU = “THEMEGUARD(RGB(255,0,0))”
vsoCharacters.CellsSRC(visSectionObject, visRowFill, visFillBkgnd).FormulaU = “THEMEGUARD(SHADE(FillForegnd,LUMDIFF(THEMEVAL(“”FillColor””),THEMEVAL(“”FillColor2″”))))”
vsoCharacters.CellsSRC(visSectionObject, visRowGradientProperties, visFillGradientEnabled).FormulaU = “FALSE”

Next

Application.EndUndoScope UndoScopeID1, True
End Sub

 

 

 

 

版权声明:本文为ddwarehouse原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/ddwarehouse/archive/2004/01/13/7277356.html