Very simple mini shape explorer driven by VBA macro only

Started by JuneTheSecond, August 12, 2010, 07:46:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Modified the program so that each tree view may have correct view
with corresponding document page when multi drawings are opened.
For this purpose activePage must be replaced by the page where treeview window is open.
ActiveWindow.ID is passed from button1_Click in Ribbon.cs via AnchorBarUsage.cs to Form1.cs.
All ActivePage in Form1.cs are replaced to visioActivePage.
visioActivePage = app.Windows.get_ItemFromID(visiowindowID).Page.
And please, save Ribbon designer once before run the project.
Best Regards,

Junichi Yoda


Quote from: JuneTheSecond on September 10, 2010, 07:04:32 AM
"private void addPicture" in "Form1.cs" is surprisingly simplified.
It has been done by refering to Nikolay's  useful post at;topicseen#msg9299"

private void addPicture(IPictureDisp pic, String key)

            Image img = new Metafile((IntPtr)pic.Handle, true);
            Bitmap bmp = new Bitmap(img);
            this.imageList1.Images.Add(key, bmp);


Hi, Is there a way to do the same thing in VBA?
I need to convert visio's Shape.Picture (which is of type IPictureDisp but in EMF format "See Visio Automation Reference") to a IPictureDisp in bitmap format. Because the ListImages of TreeView refuses to understand 'IPictureDisp in EMF format'.
What do i need to convert Shape.Picture to bitmap and then to icon? in VBA (not VB.NET and not C#), please.

BTW, Junichi, i think you actually ment to refer to Nicolay's post rather in this link
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln


I am very sorry to late, but I've forget about the details.
It would take much more time to remember.
Best Regards,

Junichi Yoda