Resizing a Text Block using VB

G

Gerald K

Hi,

I am creating a text block but I can't work out how to modify the size
(height and width) of the block. Any ideas?

The code I am using is as follows:

'Place title block on page.
'Open the Title Blocks stencil
Set titleObj = Application.Documents.OpenEx("Basic Shapes.vss", visOpenDocked)
'Process the block shape
Set titleMstr = titleObj.Masters("Shadowed Box")
Set titleShp = ActivePage.Drop(titleMstr, pageWidth / 2, pageHeight)
'Set the title text
titleShp.Text = "Work Pad"
 
J

John Marshall, MVP

G

Gerald K

Great, thanks John.

John Marshall said:
This is one way, but there are simpler methods for adjusting these cells

titleShp.CellsSRC(visSectionObject, visRowTextXForm,
visXFormWidth).FormulaU = "Width*1.6766666666667"
titleShp.CellsSRC(visSectionObject, visRowTextXForm,
visXFormHeight).FormulaU = "Height*3.6666666666667"

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top