计算Layout上所有图形元素个数
Public void CountLayoutElements()
{IMxDocument pMxDoc =ThisDocument
IGraphicsContainer pGContainer =pMxDoc.PageLayout;
pGContainer.Reset();//确保指针指向最初的位置
IElement pElement = pGContainer.Next();
Int intGraphicCount = 0;
Do
{If TypeOf(pElement) is IGraphicElement
{ intGraphicCount = itGraphicCount +1}
pElement = pGContainer.Next();
}While(pElement=null)
MsgBox.show(“There are " & intGraphicCount & " graphics on the page“)}
Example: Count all the graphic elements on the layout
Public Sub CountLayoutElements ()
Dim pMxDoc As IMxDocument
Dim pGContainer As IGraphicsContainer
Dim pElement As IElement
Dim intGraphicCount As Integer
Set pMxDoc = ThisDocument
Set pGContainer = pMxDoc.PageLayout
pGContainer.Reset '*Make sure the pointer is on the first item
Set pElement = pGContainer.Next '*pull out the first element
Do Until pElement Is Nothing '*Loop thru all elements
If TypeOf pElement Is IGraphicElement Then
intGraphicCount = intGraphicCount + 1 '*increment the count
End If
Set pElement = pGContainer.Next '*pull out the next element
Loop
MsgBox "There are " & intGraphicCount & " graphics on the page"
Exit Sub
旋风图片格式转换器是一款将图片在JPG、PNG、BMP这三种格式之间相互转换的工具,软件界面简洁,操作简单,需要的朋友可以前来本站下载。
基本介绍
旋风PDF转Word是一款功能强大、操作简单的PDF转换成word软件。支持绝大多数的PDF文件转换并保留住原生PDF的排版。
不一会儿,将图片的格式转换为您想要的
操作系统支持:Windows XP,Windows 7 Windows 8 W