We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

COM Shapes - Making a shape visible or not and alignment


I have the following code using the word COM model:

ActiveDocument.shapes(“AutoShape 3”).Select
Selection.ShapeRange.Left = wdShapeCenter
Selection.ShapeRange.Visible = False

How can i achieve this using the aspose words comhelper class (i am using vb6 with word 2013)?

thanks for your help


Hi Asif,

Thanks for your inquiry. Please use the Font.Hidden property to achieve your requirement. See the following code snippet for your kind reference.

Dim helper

Set helper = CreateObject("Aspose.Words.ComHelper")

Dim doc

Set doc = helper.Open("C:\in.docx")

Dim shape

Set shape = doc.Sections.Item(0).Body.GetChild(18, 0, True) 'Constant NodeType_Shape = 18 (&H12)

shape.Font.Hidden = False

doc.Save ("C:\out.docx")

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;}


Aspose.Words defines four publicly creatable COM objects i.e.
ComHelper, Document, DocumentBuilder and License. To access other
classes/methods available in Aspose.Words API, you must have to create
wrapper/helper classes. However, we will consider making all public API
accessible from COM and scripting languages in future. Your request has
been linked to the appropriate issue (WORDSNET-4977) in our issue tracking system and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Please also visit the following link to learn how to use Aspose.Words for .NET via COM Interop: