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

C#

 
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 
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 
Your remarks are all very true, i started programming PHP and very new to C#, about a week ago to be precise. I am trying to make a program that takes a raw text file of numbers and then converts those numbers into Chinese characters, which were hand drawn and scanned in as jpg. So the text file contains something like 1.2.3.4.5. and so forth, so the full stop allows the string to be split and placed into an array. This is then cycled through and the image added to word document which has the same number.

A few reasons for doing it this way is because i want to be able decided how the tables are laid out in word. So i might want them to list in columns and decide how many columns are on each page, the same with rows.

Overall you could say this is trying to automate the process of inserting images into a word document.

The script always works if the number is below 101, as soon as it goes to 102 or higher it causes the error. I have tried changing image names which i know work and the error still is thrown. Therefore, the error is thrown in my code but i don't know whether it could be word causing the problem

the error is on this line:
wordApp.Selection.InlineShapes.AddPicture(FilePath , ref missing, ref missing, ref missing);

saying that FilePath is not a valid file name

I would of thought it would of been an overflow problem if there was already a large number of images, however, if you just type 102 in the raw text file it will cause an error immediately, before it has chance to even add one file to the document.

Numbe is an array which contains all the numbers of the text file, one number in each element of the array.
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 
AnswerRe: windows forms refresh, update??? Pin
0x3c013-Aug-09 0:35
0x3c013-Aug-09 0:35 
GeneralRe: windows forms refresh, update??? Pin
dimo198213-Aug-09 0:55
dimo198213-Aug-09 0:55 

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.