Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
SuggestionRe: SQLite encryption types for data Pin
Richard Deeming23-Mar-15 3:31
mveRichard Deeming23-Mar-15 3:31 
QuestionHow to add the current items into combobox at runtime Pin
Member 1154531322-Mar-15 3:55
Member 1154531322-Mar-15 3:55 
AnswerRe: How to add the current items into combobox at runtime Pin
Dave Kreskowiak22-Mar-15 4:42
mveDave Kreskowiak22-Mar-15 4:42 
GeneralRe: How to add the current items into combobox at runtime Pin
Mycroft Holmes22-Mar-15 14:13
professionalMycroft Holmes22-Mar-15 14:13 
GeneralRe: How to add the current items into combobox at runtime Pin
Dave Kreskowiak22-Mar-15 14:18
mveDave Kreskowiak22-Mar-15 14:18 
Questiondata from file Word in DataGridView Pin
Member 1071053221-Mar-15 5:10
Member 1071053221-Mar-15 5:10 
AnswerRe: data from file Word in DataGridView Pin
OriginalGriff21-Mar-15 5:22
mveOriginalGriff21-Mar-15 5:22 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 6:24
Member 1071053221-Mar-15 6:24 
In Word there is a table. I created a form WindowsForms and added elements DataGridVew and Button.
C#
private Word.Application wordapp;
        private Word.Document worddocument;
        private Word.Range wordcellrange;

        private void button3_Click_1(object sender, EventArgs e)
        {
            wordapp = new Word.Application();
            wordapp.Visible = true;
            worddocument = wordapp.Documents.Open("C:\\Users\\Desktop\\Table.doc");
            Word.Table _table = worddocument.Tables[1];
            int a = _table.Rows.Count;
            int b = _table.Columns.Count;
            for (int i = 1; i <= a; i++)
                for (int j = 1; j <= b; j++)
                {
                    wordcellrange = _table.Cell(i, j).Range;
                    dataGridView3.Rows[i - 1].Cells[j - 1].Value = wordcellrange.Text;
                }
        }

Code only opens an existing file.
GeneralRe: data from file Word in DataGridView Pin
OriginalGriff21-Mar-15 6:32
mveOriginalGriff21-Mar-15 6:32 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 6:47
Member 1071053221-Mar-15 6:47 
GeneralRe: data from file Word in DataGridView Pin
OriginalGriff21-Mar-15 6:57
mveOriginalGriff21-Mar-15 6:57 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 7:24
Member 1071053221-Mar-15 7:24 
GeneralRe: data from file Word in DataGridView Pin
OriginalGriff21-Mar-15 7:47
mveOriginalGriff21-Mar-15 7:47 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 8:04
Member 1071053221-Mar-15 8:04 
GeneralRe: data from file Word in DataGridView Pin
OriginalGriff21-Mar-15 8:14
mveOriginalGriff21-Mar-15 8:14 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053222-Mar-15 23:46
Member 1071053222-Mar-15 23:46 
GeneralRe: data from file Word in DataGridView Pin
OriginalGriff23-Mar-15 0:10
mveOriginalGriff23-Mar-15 0:10 
AnswerRe: data from file Word in DataGridView Pin
manchanx21-Mar-15 5:27
professionalmanchanx21-Mar-15 5:27 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 6:37
Member 1071053221-Mar-15 6:37 
GeneralRe: data from file Word in DataGridView Pin
manchanx21-Mar-15 6:46
professionalmanchanx21-Mar-15 6:46 
GeneralRe: data from file Word in DataGridView Pin
Member 1071053221-Mar-15 6:49
Member 1071053221-Mar-15 6:49 
GeneralRe: data from file Word in DataGridView Pin
manchanx21-Mar-15 6:50
professionalmanchanx21-Mar-15 6:50 
QuestionC# trackBar Control is losing Color (Hue) when adjusting Brightness Pin
Member 1154317320-Mar-15 23:12
Member 1154317320-Mar-15 23:12 
AnswerRe: C# trackBar Control is losing Color (Hue) when adjusting Brightness Pin
manchanx21-Mar-15 4:18
professionalmanchanx21-Mar-15 4:18 
GeneralRe: C# trackBar Control is losing Color (Hue) when adjusting Brightness Pin
Member 1154317321-Mar-15 11:16
Member 1154317321-Mar-15 11:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.