Click here to Skip to main content
11,804,574 members (80,349 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#

I have Some Theory Content On Win Form .When I Copy That Content and paste it to word file

It copied but Alignment got disturbed

So how to convert that WIN form content directly into word file so that I will get it as it on form?

Please tell me this.
Posted 19-Feb-13 5:58am
Edited 19-Feb-13 6:00am
CHill60 at 19-Feb-13 12:05pm
Are you copying from a textBox? Try using a RichText box instead.
Sergey Alexandrovich Kryukov at 19-Feb-13 12:19pm
It's not that simple. The idea of alignment in a form and a Word document is very different; Word document is a kind of flow document.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question: this is not easy. I understand you don't want to use graphics but want a document with text which can be copied, manipulated, etc. You can only imitate form layout, in some approximate ways.

On idea is this: you can imitate layout with a complex table (by "complex" I mean with the use of merged cells).

Another idea is to give up from the idea to represent a form. Form is one thing, data it represent is another one, the saved document is something different. Perhaps you need to go from data to document, skipping the form. Develop some document representation of data in a way independent from the form. Think about it, this is not the worst idea.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100