Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: JuneTheSecond on June 04, 2009, 08:06:20 AM

Title: Visio-WordArt
Post by: JuneTheSecond on June 04, 2009, 08:06:20 AM
Hi,

I've enhanced Visio-WordArt that was posted at "Automatic Tracing".

You can make WordArt like shapes.
Edit text on the shape and select right click menu "Visio-WordArt".
Font may be changed in text editing.
Enter any number for layout of text from 1 to 40 selecting from the tabel below.

I am sorry to say fill and shadows must be made with Visio menus.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 04, 2009, 08:27:32 AM
Hi,

Hi, here are eaxample drawings of Visio-WordArt.
Title: Re: Visio-WordArt
Post by: Visio Guy on June 04, 2009, 09:37:48 AM
Thanks for making a new topic. This is really a fun tool to use!

Title: Re: Visio-WordArt
Post by: vojo on June 04, 2009, 12:52:52 PM
Nice tool...unfortunately, I get a VBA error when I try this tool....any other DLL, EXEs, etc I need?
Title: Re: Visio-WordArt
Post by: Paul Herber on June 04, 2009, 01:03:31 PM
I also get an error at the line

Set shp = Application.ActiveWindow.Page.InsertObject("{00020906-0000-0000-C000-000000000046}", visInsertAsEmbed)

Title: Re: Visio-WordArt
Post by: wapperdude on June 04, 2009, 03:03:25 PM
Really???  It ran fine for me.  It's really cool.  The font faces with "body" turn out really well.  Running Win XP SP3, V2007 Std. 

Whoops!  Guess I need to add, that was the original version, not this improved version.  Will get back on this.

At work, now ...

...Yes.  Ran into an error also, but different line:  shpGroup.Cells("FillBkgnd").FormulaU = "THEMEGUARD(TINT(THEME(""LineColor""),48))"

OK. This error is due to the fact I ran it on a system that is using V2003Pro, and does not support TINT, not sure about THEMEGUARD. 


Both version produce this error, but, both version generate the WordArt.

Wapperdude
Title: Re: Visio-WordArt
Post by: vojo on June 04, 2009, 04:05:56 PM
ok...my problem turns out to be themes.   I am running 2003 std....VBA does not like the them statements in the macro.

Anybody know a way for a macro to determine 2003 vs 2007 (short of looking for some theme cell)?

This does raise the point....given the usefullness of this macro, how could one add to stencil so it could be used at will
(ie how to ensure the VBA moves with the shape)
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 05, 2009, 12:29:02 AM
Hi, Paul.

For error of inserting Word, please try "Word.Document" or "Word.Document.8", 
(or any number than 8, may be) in place of unique name "{00020906-.....
    Set shp = Application.ActiveWindow.Page.InsertObject("Word.Document.8", visInsertAsEmbed)

And please, comment out all the lines that include ThemeGuard function.

My main PC is now down because of over heating, revision of my macro may delay.

Title: Re: Visio-WordArt
Post by: Visio Guy on June 05, 2009, 07:55:15 AM
You can check the Visio application's version. Since we are dealing with formulas that are quoted, this will work. Ie: we are not referencing object-mode properties and methods that might not exist:

I have Visio 2007 Pro, I get this:

?visio.Application.Version
12.0

So if you have less than 12.0, skip over the code that sets Theme-related formulas, or replace it with something that makes sense for older versions of Visio.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 05, 2009, 10:38:54 AM
Hi,

Thank you again, Chris.

I've modified my macro, and testted in Visio2003.
But I cannot yet test it in Visio2007.
Visio2007 is in broken PC.

I am sory for me to post old one.
Now it is replaced.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 06, 2009, 12:33:11 PM
I've changed above drawing again.
If you save Visio2007 drawing in Visio2003, The formula ThemeGuard(... is converted to RGB(..... .
The Revision is that if the version of Visio is not 12.0, then the formula is changed to RGB function.

And  more, modified a bit, because shadow is black.

I am sorry that I've not yet tested it in Visio2007.
VRM of mother board on my main PC seems burnt.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 09, 2009, 11:39:38 AM
Hi,

One more enhance.
Effect 6, 19, 24 , 28 are added.
For effect 6-28 you are recommended to remove shadows.
But other than default 1 are very much heavy.
I am sorry I have not yet tested in Visio2007.
My main PC is still stopped.
Title: Re: Visio-WordArt
Post by: artbraune on June 09, 2009, 12:28:52 PM
Yoda-san,

This is a great tool. One feature request if I may - I would like a selection that just converts text to wordart without any transformation. The early version of this tool did that - but did not have as clean of a result as this current version.

Thanks!
Art

Quote from: JuneTheSecond on June 09, 2009, 11:39:38 AM
Hi,

One more enhance.
Effect 6, 19, 24 , 28 are added.
For effect 6-28 you are recommended to remove shadows.
But other than default 1 are very much heavy.
Title: Re: Visio-WordArt
Post by: Visio Guy on June 09, 2009, 01:11:41 PM
Hi Art,

I think you just enter "1" in the shape data field for the "magic box".

He's got all the effect "shadows" in the document so that you can quickly refer to the proper id.
Title: Re: Visio-WordArt
Post by: artbraune on June 09, 2009, 08:57:01 PM
Chris,

I tried "1" and got something other than what I was expecting??? At least in Visio 2007 SP2?

The initial version did great - but the font width versus the output width was always way off (with the output always coming up far wider than the original). The current version is right on - but I do not want any effects.

Make sense?

I can post an example from both versions later...

Art

Quote from: Visio Guy on June 09, 2009, 01:11:41 PM
Hi Art,

I think you just enter "1" in the shape data field for the "magic box".

He's got all the effect "shadows" in the document so that you can quickly refer to the proper id.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 09, 2009, 11:42:50 PM
Hi,

I've modified.
Effect=0 and LAYOUT=1 makes simple shapes.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 10, 2009, 12:08:37 AM
Hi,

Heavy shape with effect can be manualy compressed with hard work in menues, Union and Send to Back.
I've tried to make hard work into automation, but not yet done.
The problem is how to choose the shapes to Union.
Title: Re: Visio-WordArt
Post by: artbraune on June 10, 2009, 03:17:18 AM
Yoda-san,

Thanks! I was able to use the Effect=0, but am not able to use Layout=0. I get the following error: "Layout musy be 1 thru 40".

Art

Quote from: JuneTheSecond on June 09, 2009, 11:42:50 PM
Hi,

I've modified.
Effect=0 and LAYOUT=0 makes simple shapes.
Title: Re: Visio-WordArt
Post by: artbraune on June 10, 2009, 03:19:41 AM
If I use it with Effect=0 and Layout=1 - I do get a pretty good result. 8^)

Quote from: JuneTheSecond on June 09, 2009, 11:42:50 PM
Hi,

I've modified.
Effect=0 and LAYOUT=0 makes simple shapes.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 10, 2009, 05:44:21 PM
Hi,

To compress heavy shapes, I've made a macro.
It simply Union and Send to back fine fragment shapes.
It is not a complete program, but it is tuned up,
and added function to automatically add menus for
compress to the new shapes to compress.
This test macro saves about 60% of resources.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 16, 2009, 05:02:07 AM
Hi,

My main PC has recovered and I found that the effects on the macro above
do not work correctly in Visio2007.
This is the macro that just paste WordArt as EMF picture on Visio page.
This new macro does not convert WordArt into Visio geometry.
If you answer yes to the last message, you can trim the blank space around
WordArt with crop tool.

By the way, the metafile made by WordArt is mysterious.
How is it constructed?
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 17, 2009, 12:30:31 AM
Hi,

Above Visio-WordArt 2.vsd was modified and replaced.
Some part of WordArt pictures were cut out.
And then program is modified and improved, but I am sorry it is not yet perfect.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 17, 2009, 02:23:35 AM
Hi,

One of the application may be to make a shape like a flag.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 18, 2009, 11:53:21 AM
Hi,

Visio-WordArt 2.vsd is now more improved.
Some options that are seen in WordArt are added.
Width and Height are the size of the shape in inches.
LEFT and TOP are the text starting point in inches
from the left and top of the shape.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on June 29, 2009, 04:59:37 AM
Hi,

I've updated Visio-WordArt.
Now, all WordArt images are converted to Visio shapes.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on July 02, 2009, 05:12:09 AM
This is the version of simplified 3d-shadows,
for effect numbers, 19, 24 through 29.
These shadows are now single shape.
Their shadows are mono-tone, but very light in file size.
DrawRegion method is used to unify thousand of shapes.
It takes several minutes to process unifying shapes.
My PC sometimes stopped due to the shortage of resources.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on July 02, 2009, 09:33:10 PM
Hi,

Above Visio file is updated again and replaced.
Now, effect number 18 is modified to simple shadow because it is also 3d-shadow.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on July 08, 2009, 06:26:29 AM
Hi,

I've written about my study of problem and solution
when I was making WordArt on Visio drawing
and converting WordArt object to Visio shape.
It is here.
http://www.geocities.jp/visualcalculation/english/visioart.htm
Title: Re: Visio-WordArt
Post by: Visio Guy on July 08, 2009, 08:17:50 AM
Thanks Junichi for a really great effort in creating the macros and explaining your history in working on the problem on your web site.

This is really cool to have for all of us!
Title: Re: Visio-WordArt
Post by: JuneTheSecond on July 14, 2009, 03:10:48 AM
Hi,

This is the version of EMF 3-d shadows.
Text faces are Visio shapes, but 3-d shadows are EMF images.
Now, 3-d shadows look like 3-d.
The point of this program is to match exactly the size and the location
of the text shapes and 3-d shadows.
In order to smooth the edges of the text,
lines were added to some of the shapes.
Title: Re: Visio-WordArt
Post by: JuneTheSecond on July 14, 2009, 12:06:41 PM
Hi,

A little update so that line colors of the text can be automatically decided when user changes the fill color of the text.

Line color is the mean value of the fore ground color and back ground color of the text fill color.
The formula to calculate mean value is
strMeanLineColor = "RGB((RED(FillForegnd)+RED(FillBkgnd))*0.5,(GREEN(FillForegnd)+GREEN(FillBkgnd))*0.5,(BLUE(FillForegnd)+BLUE(FillBkgnd))*0.5)"
Title: Re: Visio-WordArt
Post by: JuneTheSecond on August 04, 2009, 09:20:17 AM
Hi,
Above macro worked in Visio2010 preview in my PC.
But the resolution of 3d-shadow is not enough.
Then I changed the 3d-shadows to simple meta file from enhanced meta file.

WordArt in Word 2010 has greatly changed, but VBA seems to support
Office2003 WordArt. Is it correct?


Title: Re: Visio-WordArt
Post by: rsoby on October 08, 2009, 05:23:49 PM
This is way cool - you guys are way too creative
Rich
Title: Re: Visio-WordArt
Post by: Visio Guy on October 08, 2009, 07:08:57 PM
Junichi,

Nice job on the auto-line color algorithm. That is interesting to average the foreground and background colors.

I wrote a post on choosing contrasting colors for text (against a background color) that is related to this and might be interesting. Read: Make Your Text Stand Out! (http://www.visguy.com/2008/10/31/make-your-text-stand-out/).

Also, Saveen Reddy recently posted an interesting article about Edge Rendering Improvement in Visio 2010 (http://blogs.msdn.com/saveenr/archive/2009/09/04/edge-rendering-improvement-in-visio-2010.aspx). In Visio 2010, the rendering of edges is better, so your Visio Word-Art might not even need a line color in order to look smooth!