Microsoft-Word custom form
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

I need to place the output of this MS Word macro into a "custom form"

The form should match the Font Face of the MS Word tree.

See video:

old code and test DOC:

awarded to mashtullah

Crowdsource coding tasks.

1 Solution

I have edited your macro abit and and created a new Userform to show the output. The output font and size is as specified in the video.
Below is the link to the macro-enabled word document i created containing my changes, test it out and let me know if you have any issues.

This is the updated version

Second Update, i have now created the labels during runtime so as to adjust the spacing between them.
Below is the link

I know their might be a very slight difference in alignment due to screen resolution and other reasons, but on my computer its aligned, so incase on your end it is not, please adjust the currentTop variable.
check the line below

currentTop = lblOutput.Top + lblOutput.Height + 1.4
to decrease the spacing decrease the last value which is 1.4 to maybe 1 or 1.2. To increase the spacing just increase that last value.

Now you will have to do that twice, since i write on the first label then i write on the other labels inside the loop.

Incase of any queries let me know...

I think that's good. The font-size is correct. But can you increase the line-spacing between lines. see image
tonloc 23 days ago
Also, can you make sure that numbers with over 3 characters have a comma. e.g. like 9,999
tonloc 23 days ago
In VBA a label doesn't have a line-spacing property, it's the font that decides how much space will be between each line of text within the label... I have updated the comma separator on the numbers and added the new link on my answer
mashtullah 23 days ago
Yes I know. Maybe you can put the text in a textbox and use the Lineheight property. Or, maybe you can create an instance of a text label, for each H1 line. It's really important that the form text line-up with the ms word tree. Else, it's not very useful.. I'll give you a tip.
tonloc 23 days ago
Working on it now... FYI the TextBox.LineHeight property only applies to .Net and not VBA
mashtullah 23 days ago
Thanks for the tip, God Bless you!
mashtullah 23 days ago
ok thanks, why are there 2 forms?
tonloc 22 days ago
Please delete the first form, the working form is called frmMain hope this worked for you! keep those VBA bounties coming...
mashtullah 22 days ago
Thanks, do you know if macros MUST be saved in a DOCM file? e.g. can i somehow save the macro as "a part of MS Word" - so that my book file does not need to be a DOCM file.
tonloc 20 days ago