vsoShape1.text in VB forces alignment

Started by jzdesoucey, September 30, 2019, 09:39:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jzdesoucey

Trying to use an old module to populate a drawing with multiple objects from a *.prn file.
When I get to the vsoShape1.text line in the code the drawing forces me to align or cancel.
How can I get this to stop or take advantage of it? There are nearly 100 objects to be created.

Code Example Follows:

***"If Field1 = "Vnet" Then
Set vsoMaster = Visio.Documents.Item("CnE_CloudV2.7.vss").Masters.ItemU("Virtual Network")
Set vsoShape1 = ActivePage.Drop(vsoMaster, dblx, dbly)
vsoShape1.Text = Field2
vsoShape1.Name = Field2"***

    Else

Yacine

Check the validity of Field2.
eg: if not field2 is nothing then...

bad practice but possible:
enclose the critical code between "on error resume next" and "on error goto 0"

Yacine