Click here to Skip to main content
16,013,548 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calling functions and methods in a child form Pin
OriginalGriff6-Aug-09 10:20
mveOriginalGriff6-Aug-09 10:20 
AnswerRe: Calling functions and methods in a child form Pin
DaveyM696-Aug-09 10:54
professionalDaveyM696-Aug-09 10:54 
GeneralRe: Calling functions and methods in a child form Pin
alias bill6-Aug-09 12:02
alias bill6-Aug-09 12:02 
GeneralRe: Calling functions and methods in a child form Pin
DaveyM696-Aug-09 21:54
professionalDaveyM696-Aug-09 21:54 
AnswerRe: Calling functions and methods in a child form [modified] Pin
nelsonpaixao6-Aug-09 13:58
nelsonpaixao6-Aug-09 13:58 
QuestionUsing a Session variable in an UpdateCommand Pin
JohnQuar16-Aug-09 9:17
JohnQuar16-Aug-09 9:17 
AnswerRe: Using a Session variable in an UpdateCommand [ Posted on Wrong Forum ] Pin
Abhijit Jana6-Aug-09 9:24
professionalAbhijit Jana6-Aug-09 9:24 
QuestionMS word tables using C# Pin
Member 41540746-Aug-09 9:00
Member 41540746-Aug-09 9:00 
Hi,

I have been trying to populate a table in word from C#, originally i was using this code which i found on an article on this site and just adapted:

        public void CreateFileColumn(ArrayList array, Array Numbe)<br />
        {<br />
            object missing = System.Reflection.Missing.Value;<br />
            object fileName = "normal.dot";<br />
            object newTemplate = false;<br />
            object docType = 0;<br />
            object isVisible = true;<br />
            Object oUnit = Word.WdUnits.wdCell;<br />
<br />
<br />
            wordApp = new Word.ApplicationClass();<br />
            wordDoc = wordApp.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible);<br />
            wordApp.Visible = true;<br />
            wordDoc.Activate();<br />
            <br />
            //draw table into document<br />
            wordApp.Selection.Tables.Add(wordApp.Selection.Range, 1, 8, ref missing, ref missing);<br />
           <br />
            wordApp.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;<br />
            wordApp.Selection.Font.Bold = (int)Word.WdConstants.wdToggle;<br />
<br />
<br />
            //replace each number with picture then add to document<br />
            foreach (string part in Numbe)<br />
            {<br />
                wordApp.Selection.InlineShapes.AddPicture(@"C:\Users\Jon\Documents\Nick\Chin Font Files\" + part + ".jpg", ref missing, ref missing, ref missing);<br />
                //wordApp.Selection.InlineShapes.AddPicture(@"C:\Documents and Settings\All Users\Documents\nick\Chin Font Files\" + part + ".jpg", ref missing, ref missing, ref missing);<br />
                wordApp.Selection.MoveRight(ref oUnit, ref missing, ref missing);<br />
            }<br />
<br />
<br />
            <br />
<br />
        }


all this does is take an image from the folder listed and place them in a cell in the table, and keeps doing this until the arraylist is empty. However, it has got to the point now where i need to be more precise then just move right, i need to select which table i am in and what cell i am placing the image in. I know there is ways using cell[] and table[], but i don't know how to implement this in this piece of code.

Any help would be greatly appreciated Smile | :)
AnswerRe: MS word tables using C# Pin
toby316-Aug-09 12:01
toby316-Aug-09 12:01 
GeneralRe: MS word tables using C# Pin
Member 41540746-Aug-09 21:51
Member 41540746-Aug-09 21:51 
GeneralRe: MS word tables using C# Pin
toby316-Aug-09 22:09
toby316-Aug-09 22:09 
GeneralRe: MS word tables using C# Pin
Member 41540747-Aug-09 7:58
Member 41540747-Aug-09 7:58 
QuestionProblem Calling CheckListBox Pin
Member 28652716-Aug-09 7:31
Member 28652716-Aug-09 7:31 
AnswerRe: Problem Calling CheckListBox Pin
Andrew Rissing6-Aug-09 7:56
Andrew Rissing6-Aug-09 7:56 
AnswerRe: Problem Calling CheckListBox Pin
Luc Pattyn6-Aug-09 7:56
sitebuilderLuc Pattyn6-Aug-09 7:56 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 11:48
Member 28652716-Aug-09 11:48 
AnswerRe: Problem Calling CheckListBox Pin
DaveyM696-Aug-09 11:14
professionalDaveyM696-Aug-09 11:14 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 15:01
Member 28652716-Aug-09 15:01 
Questionread Sql DataBase Error Pin
toby316-Aug-09 7:28
toby316-Aug-09 7:28 
AnswerRe: read Sql DataBase Error Pin
musefan6-Aug-09 7:32
musefan6-Aug-09 7:32 
GeneralRe: read Sql DataBase Error Pin
toby316-Aug-09 7:34
toby316-Aug-09 7:34 
GeneralRe: read Sql DataBase Error Pin
Ashfield6-Aug-09 8:51
Ashfield6-Aug-09 8:51 
AnswerRe: read Sql DataBase Error Pin
dan!sh 6-Aug-09 8:52
professional dan!sh 6-Aug-09 8:52 
AnswerRe: read Sql DataBase Error Pin
toby317-Aug-09 0:33
toby317-Aug-09 0:33 
QuestionC# PDB symbols Pin
nachiket076-Aug-09 7:23
nachiket076-Aug-09 7:23 

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.