Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
GeneralRe: randomization of numbers without duplication in C# Pin
Pete O'Hanlon13-Aug-09 4:11
mvePete O'Hanlon13-Aug-09 4:11 
GeneralRe: randomization of numbers without duplication in C# Pin
Luc Pattyn13-Aug-09 4:21
sitebuilderLuc Pattyn13-Aug-09 4:21 
GeneralRe: randomization of numbers without duplication in C# Pin
molesworth13-Aug-09 4:52
molesworth13-Aug-09 4:52 
GeneralRe: randomization of numbers without duplication in C# Pin
Pete O'Hanlon13-Aug-09 9:19
mvePete O'Hanlon13-Aug-09 9:19 
GeneralRe: randomization of numbers without duplication in C# Pin
benjymous13-Aug-09 4:44
benjymous13-Aug-09 4:44 
AnswerRe: randomization of numbers without duplication in C# Pin
PIEBALDconsult13-Aug-09 5:13
mvePIEBALDconsult13-Aug-09 5:13 
AnswerRe: randomization of numbers without duplication in C# Pin
cmk13-Aug-09 11:34
cmk13-Aug-09 11:34 
QuestionComexception with addpicture Pin
Member 415407413-Aug-09 0:44
Member 415407413-Aug-09 0:44 
Hi
The procedure below takes a name from the Numbe array and places it in a directory path to find an image file to insert into a word document. All the images are numbered 1,2,3,4.... however, when the number gets bigger than 101 then the compiler complains that the file name is invalid, the file does exist so i can't figure out what is invalid about it?

public void CreateFileColumn(ArrayList array, Array Numbe)
        {
            object missing = System.Reflection.Missing.Value;
            object fileName = "normal.dot";
            object newTemplate = false;
            object docType = 0;
            object isVisible = true;
            Object oUnit = Word.WdUnits.wdCell;
            string FilePath;
           // string table1;

            wordApp = new Word.ApplicationClass();
            wordDoc = wordApp.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible);
            wordApp.Visible = true;
            wordDoc.Activate();
            
            //draw table into document
            wordApp.Selection.Tables.Add(wordApp.Selection.Range, 1, 8, ref missing, ref missing);
           
            wordApp.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;
            wordApp.Selection.Font.Bold = (int)Word.WdConstants.wdToggle;

            
            //replace each number with picture then add to document
            foreach (string part in Numbe)
            {
                FilePath = @"C:\Users\Jon\Documents\Nick\Chin Font Files\" + part + ".jpg";
                wordApp.Selection.InlineShapes.AddPicture(FilePath , ref missing, ref missing, ref missing);
                wordApp.Selection.MoveRight(ref oUnit, ref missing, ref missing);
            }

        }


Thanks
AnswerRe: Comexception with addpicture Pin
Luc Pattyn13-Aug-09 1:27
sitebuilderLuc Pattyn13-Aug-09 1:27 
GeneralRe: Comexception with addpicture Pin
Member 415407413-Aug-09 3:23
Member 415407413-Aug-09 3:23 
GeneralRe: Comexception with addpicture Pin
Luc Pattyn13-Aug-09 3:35
sitebuilderLuc Pattyn13-Aug-09 3:35 
GeneralRe: Comexception with addpicture Pin
Member 415407413-Aug-09 3:45
Member 415407413-Aug-09 3:45 
QuestionLoad Report Failed Pin
Milind Panchal13-Aug-09 0:07
Milind Panchal13-Aug-09 0:07 
AnswerRe: Load Report Failed Pin
Abhishek Sur13-Aug-09 2:41
professionalAbhishek Sur13-Aug-09 2:41 
QuestionGet Html Element Pin
Mohsen Esmailpour12-Aug-09 23:44
professionalMohsen Esmailpour12-Aug-09 23:44 
AnswerRe: Get Html Element Pin
0x3c012-Aug-09 23:50
0x3c012-Aug-09 23:50 
GeneralRe: Get Html Element Pin
kKamel12-Aug-09 23:51
kKamel12-Aug-09 23:51 
GeneralRe: Get Html Element Pin
0x3c012-Aug-09 23:56
0x3c012-Aug-09 23:56 
GeneralRe: Get Html Element Pin
kKamel13-Aug-09 0:14
kKamel13-Aug-09 0:14 
GeneralRe: Get Html Element Pin
Mohsen Esmailpour13-Aug-09 0:17
professionalMohsen Esmailpour13-Aug-09 0:17 
GeneralRe: Get Html Element Pin
0x3c013-Aug-09 0:31
0x3c013-Aug-09 0:31 
Question__doPostBack Event Pin
kKamel12-Aug-09 23:34
kKamel12-Aug-09 23:34 
AnswerRe: __doPostBack Event Pin
0x3c012-Aug-09 23:53
0x3c012-Aug-09 23:53 
QuestionHow to establish link between Textbox and Button using MVP architecture and C# Pin
Krishna Aditya12-Aug-09 23:22
Krishna Aditya12-Aug-09 23:22 
Questionwindows forms refresh, update??? Pin
dimo198212-Aug-09 23:05
dimo198212-Aug-09 23:05 

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.