Hello!
How can i save my layout in Form1 I am using VB 2005 Express.
Form1 contains about 150 TextBoxes, 50 Labels and 1 Rich TextBox.
I want to save the layout as a Word document with Boderstyle around TextBoxes and Labels.
Does anyone have a code example
Can't get it to work!
Grateful for any help.

Save layout
wum
yes! maybe it could work.
How do i wright the code to get it to work
Im just a beginner in programing.
Tanks for answering!
Larry.Dugger
I want to save my layout in Form1 into a Word document and i would like to
be able to edit it in Word 2003
Thanks for answering!
I.H
SQLVBusion
Are you saying to want to save an image of the form as image in a Word document
Demix
OK, the following thread will determine how to save the form to a jpg file - which would be step 1
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=434448&SiteID=1
The second step would be to create a word document with this image
http://msdn2.microsoft.com/en-us/library/78whx7s6.aspx
Contains all the code you need for automating creating word documents and adding pictures to it.
Jakein2006
I think your barking up the wrong tree here of have a lot of work to do if you really want to do this.
VB allows you to develop applications - word is a word processor. If you want to show you form layout in Word then you can do a screen capture but this is not going to allow you to do any further editing.
There is no direct way to send you form layout code to word. If you want to do that then you are going to need to write some serious code to translate the form code in the designer.vb file and determine controls and placement and relate those to items that can be displayed in a word file.
You could probably achieve this through iterating through the controls collection and retrieving the control type, left, width, height, top properties and then using these.
And what about controls that may exist in your VB application that there is no similar control in word. This would be a lot of code and a one way thing.
If you did achieve it you could modify the word document but those changes couldnt be pushed back to VB - you would be manually coding any changes.
It your just trying to get to values from controls in a VB application into a word document then thats easier.
Either way trying to get form layout info to correctly show in a word document is not a simple task.
Mr Jason Smith
Now it works perfectly!
Tanks for all your help.
I.H
P.Johansson
You want to create a Word document that looks like your UI Do you want to be able to edit it in Word What version of Word
gafferuk
Tanks! this was really helpful.
As i thought, it won't be easy
Is it possible to save it as an image in Word
I won't do any changes with the document after i get it to Word.
I.H