how to insert undeletable image in word document
-
:^)How can protect the image to delete. Thanks Arun
Arun Kr
-
:^)How can protect the image to delete. Thanks Arun
Arun Kr
Please do not cross post.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
:^)How can protect the image to delete. Thanks Arun
Arun Kr
As far as I know, you can't! Maybe you can detail what exactly do you want to do...
-
As far as I know, you can't! Maybe you can detail what exactly do you want to do...
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)