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

C#

 
Questioni m facing Com error Pin
Member 37604921-Feb-07 19:54
Member 37604921-Feb-07 19:54 
AnswerRe: i m facing Com error Pin
Christian Graus1-Feb-07 19:56
protectorChristian Graus1-Feb-07 19:56 
QuestionZip a folder Pin
picasso21-Feb-07 19:12
picasso21-Feb-07 19:12 
AnswerRe: Zip a folder Pin
Stefan Troschuetz1-Feb-07 21:20
Stefan Troschuetz1-Feb-07 21:20 
Questionhow to insert undeletable image in word document Pin
Kumar Arun1-Feb-07 19:12
Kumar Arun1-Feb-07 19:12 
AnswerRe: how to insert undeletable image in word document Pin
Christian Graus1-Feb-07 19:57
protectorChristian Graus1-Feb-07 19:57 
AnswerRe: how to insert undeletable image in word document Pin
Alexandru Lungu2-Feb-07 2:17
professionalAlexandru Lungu2-Feb-07 2:17 
GeneralRe: how to insert undeletable image in word document Pin
Rakesh N Bhavsar2-Apr-08 19:54
Rakesh N Bhavsar2-Apr-08 19:54 
Hi! Alexandru
how to insert undeletable image in word document? Is it really possible! If so it will help me greate.
My requirement is Inserting an e.g. xyz.gif image into the word document. That document we download from the web server.
my code behind file in C#.NET 2.0 is:

object missing1 = System.Reflection.Missing.Value;
string strActualTemplatePath = Server.MapPath("~/TemplateToDownload//");
strActualTemplatePath += Session["TemplateActualName"].ToString(); /* file name which exist on server */
object objFilePath = strActualTemplatePath; /* path of letter where to embed an RefNo_Image. */
object readOnly = false;
object isVisible = false;

ApplicationClass objWord1 = new ApplicationClass ();
Document objWordDoc1 = objWord1.Documents.OpenOld(ref objFilePath, ref missing1, ref readOnly, ref missing1, ref missing1, ref missing1, ref missing1, ref missing1, ref missing1, ref missing1);

objWordDoc1.Activate();

objWordDoc1.Tables.Add(objWord1.Selection.Range, 1, 1, ref missing1, ref missing1);

string MyImage = Server.MapPath("~/RefNoImages//" + Session["RefNo"].ToString() + ".gif");
if (File.Exists(MyImage))
objWordDoc1.Tables.Item(1).Cell(1, 1).Range.InlineShapes.AddPicture(MyImage, ref missing1, ref missing1, ref missing1);
object oSaveChanges = true;
objWordDoc1.Close(ref oSaveChanges, ref missing1, ref missing1);
objWord1.Application.Quit(ref oSaveChanges, ref missing1, ref missing1);

NOTE: The above code is working file on the local machine. But after publishing the website is is not working.

Hope you will reply
plz reply on rakeshnb@mechsoftgroup.com

Thanks & Regards
RAKESH BHAVSAR
Pune(INDIA)
QuestionMarshal an array of string Pin
anup2kin1-Feb-07 18:52
anup2kin1-Feb-07 18:52 
QuestionDirectX and Joystick Pin
Darth Pranline1-Feb-07 18:24
Darth Pranline1-Feb-07 18:24 
AnswerRe: DirectX and Joystick Pin
Christian Graus1-Feb-07 18:33
protectorChristian Graus1-Feb-07 18:33 
Questionhow to know whether a file is being used or not by any process Pin
Praveen Raghuvanshi1-Feb-07 17:54
professionalPraveen Raghuvanshi1-Feb-07 17:54 
AnswerRe: how to know whether a file is being used or not by any process Pin
Stefan Troschuetz1-Feb-07 21:00
Stefan Troschuetz1-Feb-07 21:00 
QuestionHow to get previously logged on users on windows Pin
jdkulkarni1-Feb-07 17:50
jdkulkarni1-Feb-07 17:50 
QuestionControls Pin
Jeeva Jose1-Feb-07 17:31
Jeeva Jose1-Feb-07 17:31 
AnswerRe: Controls Pin
Christian Graus1-Feb-07 18:08
protectorChristian Graus1-Feb-07 18:08 
GeneralGet form of running application Pin
Judah Gabriel Himango1-Feb-07 16:57
sponsorJudah Gabriel Himango1-Feb-07 16:57 
GeneralRe: Get form of running application Pin
Christian Graus1-Feb-07 18:08
protectorChristian Graus1-Feb-07 18:08 
GeneralRe: Get form of running application Pin
Judah Gabriel Himango1-Feb-07 18:10
sponsorJudah Gabriel Himango1-Feb-07 18:10 
GeneralRe: Get form of running application Pin
Christian Graus1-Feb-07 18:19
protectorChristian Graus1-Feb-07 18:19 
GeneralRe: Get form of running application Pin
aSarafian1-Feb-07 21:35
aSarafian1-Feb-07 21:35 
GeneralRe: Get form of running application Pin
S. Senthil Kumar2-Feb-07 6:27
S. Senthil Kumar2-Feb-07 6:27 
QuestionSetting a default DateTime value in the dataset Pin
Glen Harvy1-Feb-07 15:05
Glen Harvy1-Feb-07 15:05 
QuestionPOS Application, printing control fonts (possibly using WORD API) Pin
jeweladdict1-Feb-07 14:46
jeweladdict1-Feb-07 14:46 
QuestionNo data breakpoints in vs c#? WTF? Pin
Member 961-Feb-07 13:20
Member 961-Feb-07 13:20 

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.