How-to Get Add-On Stencils to Dock and Merge Like Built-In

C

Cookville

I want to create Stencils on-the-fly in VBA. Each stencil represents a
customer order. Each master in each stencil represents each line item of the
order. The user will drag-n-drop the line items to locations on the drawing.

As the VBA code creates each stencil, I want to add that stencil and have it
merge with the other stencils as they dock along side the drawing page. This
represents the same action as if you manually open several stencils and they
all reside in the "Shapes" window.

My success with this has been minimal. I can create an array of windows, but
they dock at random locations around the drawing. Then I have to manually
drag them to dock and merge.

Another problem is that the stencils are blank. None of the masters that the
code creates are visible on the stencils... the masters are somehow parented
by the main drawing page, ThisDocument.

Any help in managing this is greatly appreciated.

Mel in Texas
 
C

Cookville

UPDATE:

Have found a clumsy work-around...
Step 1 is to create a blank stencil and save it to disk.
Step 2 is to use docObject.OpenEx("Blank.vss", visOpenDocked + visOpenRW +
visOpenCopy)
Step 3 is to immediately use SaveAsEx("OrderNumber12345", visSaveAsWS)
Step 4 is to create the master objects and shapes representing the Order
Line Items

Step 5 thru End of Orders --- repeat 2 thru 4 for remaining Orders

Would hope there is a way to create the stencil documents in memory rather
than having to save to disk.

Mel
 

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