Add watermark in word file programmatically.

i will be pleased if i can get a code block on how to automate a word file by adding watermark with VB 2010. i will be pleased to get a step by step illustration...

FROM
http://www.vbforums.com/showthread.php?763055-Programmatically-add-Watermark-to-Word-document-VB-Net
Private Function AddWatermark(ByVal pdocument As Word.Document) As Word.Document
            Dim nShape As Word.Shape
            For Each section As Word.Section In pdocument.Sections
                nShape = section.Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Shapes.AddTextEffect(Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1, "DRAFT",
"Rockwell Extra Bold", 90, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, 0, 0)
                nShape.Fill.Visible = Microsoft.Office.Core.MsoTriState.msoTrue
                nShape.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse
                nShape.Fill.Solid()
                nShape.Rotation = -45
                nShape.Fill.ForeColor.RGB = Word.WdColor.wdColorGray20
                nShape.RelativeHorizontalPosition = Word.WdRelativeHorizontalPosition.wdRelativeHorizontalPositionMargin
                nShape.RelativeVerticalPosition = Word.WdRelativeVerticalPosition.wdRelativeVerticalPositionMargin
                nShape.Left = Word.WdShapePosition.wdShapeCenter
                nShape.Top = Word.WdShapePosition.wdShapeCenter
            Next
            Return pdocument
        End Function

Similar Messages

  • Can i add watermarks to PDF files using the PDF Pack?

    Can i add watermarks to PDF files using the PDF Pack?

    Hi Susannah,
    Adobe PDF Pack does not allow you to edit a PDF file. For that, you would need Acrobat. You're welcome to try Acrobat for free for 30 days: see http://www.adobe.com/products/acrobat.html for more information.
    This Help document describes how to watermark a PDF in Acrobat: Add watermarks to PDFs
    Best,
    Sara

  • How can i get only the headings and their subheadings from word file in C#

    I want to get all the headings along their sub-headings separately from a word file programmatically Using c# for example i have following content :
    HEADING 1 XYZ
    heading 2
    heading 3
    HEADING 1 ABC
    HEADING 1 DEF
    heading 2 lorem ispum
    so my code should return me:
    Heading 1 XYZ
    heading 2
    heading 3
    seperately and similarly remaining headings and subheadings also.
    Bilal Amjad Microsoft Certified Professional

    Did you try to use OpenXml SDK to access word *.docx file in .Net?
    Use OpenXml SDK you could easily to get anything in Word (Office) documents.
    Bob Bao
    Do you still use the same Windows 8 LockScreen always? Download Chameleon Win8 App quickly, that changes your LockScreen constantly.
    你是否还在看着一成不变的Windows 8锁屏而烦恼,赶紧下载这个
    百变锁屏
    应用,让你的锁屏不断地变化起来。
     i am using the following code to get the output but it returns me all he headings and subheading together not separately 
     foreach (Microsoft.Office.Interop.Word.Paragraph paragraph in oMyDoc.Paragraphs )
                        Microsoft.Office.Interop.Word.Style style = paragraph.get_Style() as Microsoft.Office.Interop.Word.Style;
                        string styleName = style.NameLocal;
                        string text = paragraph.Range.Text;
                        if (styleName == "Title")
                            title = text.ToString();
                        else if (styleName == "Subtitle")
                            st = text.ToString() + "\n";
                        else if (styleName=="Heading 1")
                            heading1[h1c] = text.ToString()+"\n";
    Bilal Amjad Microsoft Certified Professional

  • How do I store spoken word files in the Podcast category on my iPod...

    I want to add some spoken word files to my iPod and store them in the Podcast section. They are not radio broadcasts and are not available through the Music Store, still there must be some way to file them where I want them.

    You can delete songs from your iTunes/computer hard drive after transferring them to the iPod, and for this you need to set your iPod to manage the songs manually.
    However, this is an extremely risky option because when (and not if) there comes a time to restore your iPod, which is a very common fix for iPod problems, then all the music would be erased. If you no longer have the music in iTunes (or any other back up), then all that music would be lost.
    What if the iPod were lost/stolen/needed repair? Again, the music would lost. I strongly recommend a back up, and if computer hard drive space is in short supply, you should seriously consider an external hard drive. They are not expensive, and the cost is well worth it when compared to the loss of all your precious music.
    At the very least back up your music to either cd or dvd before deleting it, particularly any purchased music/videos, as this would have to be bought again if it were lost. See this.
    Backing up your media in iTunes.
    Please excuse the sermon, but we see far too many people lose their music because of no back up.

  • Open And Edit Word File In SharePoint Site Programmatically (Without Save On Local system)

    Hi Sir ,
             I am working as sharepoint developer. I have face some problem in Edit and open document file in sharepoint site programmatically. I want to open file and edit directly in sahrepoint site without save in local system,
         Issue:   I have upload one doc file then try to edit and open but In that case file is dowanload and save in local save.

    Hello,
    As i understand you want to open and update word file. Please have a look at below links:
    http://mysharepointwork.blogspot.ca/2010/06/programmatically-open-and-save.html
    http://howtosharepoint.blogspot.ca/2010/05/programmatically-edit-and-save-file.html
    It is good place to start.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  How can I do this?  When I add it as a file (jpeg), the logotype is printed on a white square background.  It will be positioned on the PDF document o

    I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  How can I do this?  When I add it as a file (jpeg), the logotype is printed on a white square background.  It will be positioned on the PDF document on a light, uniform yellowing color. I want this to show through, as if the logotype was stamped directly on the document.  Thanks.age to be completely transparent

    The above was truncated and garbled a bit and I can't figure out how to edit it.  So just to repeat the question a bit more clearly: "I'm using Acrobat XI on Windows.  I want to add my company's logotype as a watermark to a PDF document.  When I add it as a file (jpeg), the logotype is printed on a white square background (because the jpeg is square with a white background of course).  It will be positioned on the PDF document on a light, uniform yellowish color, which I want to show through. I want it to look as thought the logotype was stamped directly on the document.  Thanks.

  • Add a watermark to multiple files within a PDF Portfolio in Acrobat X Pro?

    Can I add a watermark to multiple files within a PDF Portfolio in Acrobat X Pro? If so, how?  It appears as though it is a removed option.

    I've figured this out. (kind of) not using PDF Portfolio; where you could apply watermark to multiple files in Acrobat 9.
    I'm answering my own question in case there are others looking to add a watermark to multiple files.
    Step 1: Open a single file
    Step 2: Tools>Pages>Watermark>Add Watermark
    Step 3: In bottom of Watermark Edit Box, Select "Apply to Multiple"
    Step 4: Select "Add Files
    etc etc.

  • Why do file sizes change when I use "Process Multiple Images" to add watermarks?

    Hi,
    I'm using Elements 11. In order to add watermarks to many JPG pics at once, I use the function "Process Multiple Files".
    I select a source folder and a destination folder, and adds a three digit serial number to each file. I do NOT tick the checkbox marked "Change picture size". After that I define the watermark I want printed on my pics and hits OK. All the files in the source folder are processed and saved, with a new name in the destination folder. Fair and square.
    But. The file size of the new file is heavily reduced, compared to the original. It goes from 10 MB down to 500 KB (in general). Why is that? Is there any way I can prevent it?
    Regards,
    /Mikael Lindgren

    Or you can uncheck the convert files box to save them in their original format, or select one of the lossless formats PSD, BMP, TIF. What is most appropriate depends on what you intend to do with the watermarked versions.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Will not export photo. pop up says Some export operations were not performed. This file could not be opened(1). Also when I try to add a key word to ohoto the screen keyboard opens and I do not have a touch screen monitor.I have uninstalled LR6 and re-ins

    will not export photo. pop up says Some export operations were not performed. This file could not be opened(1). Also when I try to add a key word to photo
    the screen keyboard opens and I do not have a touch screen monitor.I have uninstalled LR6 and re-installed and it still does the same thing??????

    <moved from Downloading, Installing, Setting Up to Photoshop Lightroom>

  • How to scan using HP Officejet 4620 create Microsoft Word file how add Word from computer

    Unable to find option to add, install Microsoft Word ( docx) to HP Officejet 4620 Scan.   Need to scan documents to create Word docx file.  Also concerned about Word file size acceptable to email. 
    Dell printer AIO has option to easily add applications as Microsoft Word for scan but not found with HP.
    Searched but did not find solution.  Such as simple question but takes hours and maybe a fee to find answer.

    Hi @Frederickoe8 
    If I understand correctly, you are trying to scan and open the scan file using Word. When you open the scan software, choose Everyday Scan, then under File Type, you can change the file format. If you select Rich Text, the saved scan can then open in Word. As for the scan size and concern with emailing the scan, make sure you do not set the dpi too high as the higher the dpi the larger the file size.
    I hope this helps. 
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Issue regarding open word file and read only mode using c# & MS-word interop

    i am programmatically open a word file for search and highlight keyword. my routine is working fine. the problem is when i am opening the file programmatically then a dialog come and ask me to open file in read only mode. the dialog look like below one
    actually i do not want to open the file in read only mode because people can open and like to change and save. so guide me what i can do to not to open the file in read only mode.
    here is my full code. just have a look and tell me what is wrong in my code or tell me any trick as a result i can open the file not in read only mode. here is my code.
    private void button1_Click(object sender, EventArgs e)
                object fileName = "";
                string filePath = "";
                string strSaveasPath = "";
                DialogResult result = openFileDialog1.ShowDialog();
                if (result == DialogResult.OK)
                    fileName = openFileDialog1.FileName;
                    //strSaveasPath = Path.GetDirectoryName(path.ToString());
                //fileName = "Z:\\C0000000003.doc";
                List<string> _list = new List<string>();
                _list.Add("tridip");
                _list.Add("arijit");
                //object fileName = "D:\\CVArchievePath\\C0000000001.doc";
                object textToFind = "test";
                object readOnly = false;
                Word.Application word = new Word.Application();
                Word.Document doc = new Word.Document();
                object missing = Type.Missing;
                try
                    doc = word.Documents.Open(ref fileName, ref missing, ref readOnly,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing,
    ref missing, ref missing,
                                              ref missing);
                    doc.Activate();
                    object matchPhrase = false;
                    object matchCase = false;
                    object matchPrefix = false;
                    object matchSuffix = false;
                    object matchWholeWord = false;
                    object matchWildcards = false;
                    object matchSoundsLike = false;
                    object matchAllWordForms = false;
                    object matchByte = false;
                    object ignoreSpace = false;
                    object ignorePunct = false;
                    object highlightedColor = Word.WdColor.wdColorGreen;
                    object textColor = Word.WdColor.wdColorLightOrange;
                    object missingp = false;
                    Word.Range range = doc.Range();
                    foreach (string line in _list)
                        textToFind = line;
                        bool highlighted = range.Find.HitHighlight(ref textToFind,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing,
    ref missing);
                    System.Diagnostics.Process.Start(fileName.ToString());
                catch (Exception ex)
                    Console.WriteLine("Error : " + ex.Message);
                    //Console.ReadKey(true);
                finally
                    //doc.Close(missing, missing, missing);
                    if(doc!=null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(doc);
                    if (word != null)
                        System.Runtime.InteropServices.Marshal.ReleaseComObject(word);
                    word = null;
                    doc = null;
                    GC.Collect();
                    GC.WaitForPendingFinalizers();

    I know it's a very old issue and I reached to this page looking for a solution. Finally, I have found a fix to this problem.
    The problem is that we create an instance of Word and do not close it correctly. This makes program believe that the file is already open and hence you're getting the respective message of file being locked by you.
    Set the visibility of your application to true and then when you close it both file and instance should close and you will not get the problem again.

  • How to add element web Word in SharePoint Online

    Hey how are you?
    Currently I have Office 365
    I create a Sharepoint site
    and add a web part to see the conetendio
    an exel file, the web part
    is working correcamente me.
    I'm trying to add a web part to
    the contents of a Word file but can not find
    the option.
    anyone can help me to add the web part
    to Word?
    thanks

    SPUser user = SPContext.Current.Site.RootWeb.EnsureUser(*loginname*);
    Guid siteID = SPContext.Current.Site.ID;
    Guid webID = SPContext.Current.Web.ID;
    using (SPSite site = new SPSite(siteID))
    using (SPWeb web = site.OpenWeb(webID))
    try
    web.AllowUnsafeUpdates = true;
    //Get the group for this web
    SPGroup oeGroup = web.Groups[*myGroupName*];
    if (oeGroup == null) return false;
    //Add the User to the OE Group
    oeGroup.AddUser(user);
    oeGroup.Update();
    catch (Exception ex)
    //Error Handling
    finally
    web.AllowUnsafeUpdates = false;
    }http://sharepoint.stackexchange.com/questions/24966/adding-spusers-to-spgroups-programmatically-changes-user-idhttp://www.microsoft.com/en-us/download/details.aspx?id=17069

  • Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only. However opening a CSS file does not prompt that it is alr

    Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only.
    However opening a CSS file does not prompt that it is already open on or from any machine which is causing code edits to be lost.
    What we found from out testing:
    - The file can be saved from one user to the server and WILL NOT PROMPT on other machines until the saving machine has the Dreamweaver program closed completely
    - The file can be closed and  Dreamweaver minimised to the launch bar but it still will not register on other machines that it has been changed.
    - Also, until the  Dreamweaver program is closed on the machines, it will continue to open it's saved version of the file. 
    Example Scenario:
    - User 1 opens test.css (which is 2000 lines) and adds some code to the end of the file to bring it up to 2500 lines
    - Meanwhile User 2 opens test.css as well (opens as 2000 lines as User 1’s edits have not yet been saved) and adds in code to bring it to 2300 lines
    - User 1 saves his file and closes it - but  Dreamweaver is still open.
    - User 2 also saves his file and leaves  Dreamweaver  open.
    - The server will report the size and last edit of the file the same as User 2 as he was the last person to save it (and if you open from the Win7 Machine it will show as User 2’s 2300 line version)
    - If User 1 then open's the file again (from either the 'recent' in Dreamweaver OR clicking on the file directly in Finder...which version opens.... The version that User 1 saved! Not the true version on the server, but the version that User 1 edited and saved with 2500 lines in it.
    - Same for User 2, he will open 'his' version with 2300 lines in.
    Other information:
    - Files are opened directly from the server
    - Sometimes the users will save incrementally and re-open
    - Most of the time users will save incrementally and keep the files open
    - The users will never not save incrementally and just save when closing the file once finished
    - The users are usually working on the files all day
    - It is always the bottom lines of code that are lost. It could be a case of the two versions being mixed up and cutting off the newly added lines based on the line count (possibly).
    It is as if Dreamweaver is holding a cache of the version locally and then only properly looking back to the server when it has been completely closed. It is very difficult to see how the server is causing such an impact on these files, there are very few logs which are giving any indication to the root cause of the problems.
    Anyone know if this is a known issue?
    Is there a way that there can be a featured implemented on the server that doesn't allow another user to open a file if it is already open on another machine?
    Thanks

    Your server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
    Mylenium

  • How to add header to a file in mapping

    Hi,
    I need to add header to a file , the header information i am getting is dynamic , it is an IP address of the m/c from where i received the file and keeps on changing.
    Can we add this information in the header in mapping or there is any other way to acheive this.This IP is used to make a lookup  at a  latter stage  for verification purpose.
    Regards,
    SRi

    Hi Sri,
    Write Java class or an ABAP class
    in Java class or ABAP class write logic to find the first word or line
    once you find that word in your incoming file, you need to replace with a string which has the static header+firstword what you have searched
    for exmple
    Incoming file
    abcd
    <abc>123</abc>
    <def>321</def>
    Your logic should find "abcd"
    String Header = "http://www.sap.sdn.com"
    String A = "abcd" (bcoz u kow u r searching for this word)
    now concat A+Header and return the string
    IF you are writing an ABAP or Java  class include this in Interface Mapping
    Hope this helps.

  • My Office 2007 Word Files are all corrupted. Can't open any of them.

    I can create and open new 2007 Word files.  However, all my files prior to 10/27/2014 cannot be opened.  I get a corrupted message.  Says the file cannot be open because there are problems with the content.  Then asks me if I want to
    recover the content and when clicking yes, I get the same corrupted message.  Something happened on 10/27/2014.  I have three files in my Word directory that I did not create.  One is an Internet shortcut called "Install_TOR" which
    when accessed tries to bring up a site called paytordmbdekmizq.torpayusd.com'80314 but the Internet is unable to display the page.
    The other two files have the same content; one in HTML and one in text.  Both called Decrypt_Instruction.  The content is:
    What happened to your files ?
    All of your files were protected by a strong encryption with RSA-2048 using CryptoWall 2.0.
    More information about the encryption keys using RSA-2048 can be found here: en.wikipedia.org/wiki/RSA (cryptosystem)  
    What does this mean ?
    This means that the structure and data within your files have been irrevocably changed, you will not be able to work with them, read them or see them,
    it is the same thing as losing them forever, but with our help, you can restore them.
    How did this happen ?
    Especially for you, on our server was generated the secret key pair RSA-2048 - public and private.
    All your files were encrypted with the public key, which has been transferred to your computer via the Internet.
    Decrypting of your files is only possible with the help of the private key and decrypt program, which is on our secret server.
    What do I do ?
    Alas, if you do not take the necessary measures for the specified time then the conditions for obtaining the private key will be changed.
    If you really value your data, then we suggest you do not waste valuable time searching for other solutions because they do not exist.
    For more specific instructions, please visit your personal home page, there are a few different addresses pointing to your page below:
    1.https://paytordmbdekmizq.torpayusd.com/N803i4
    2.https://paytordmbdekmizq.torpayeur.com/N803i4
    3.https://paytordmbdekmizq.torpaycnf.com/N803i4
    4.https://paytordmbdekmizq.torpaycash.com/N803i4
    If for some reasons the addresses are not available, follow these steps:
    1.Download and install tor-browser: torproject.org/projects/torbrowser.html.en
    2.After a successful installation, run the browser and wait for initialization.
    3.Type in the address bar: paytordmbdekmizq.onion/N803i4
    4.Follow the instructions on the site.
    IMPORTANT INFORMATION:
    Your personal page: paytordmbdekmizq.torpayusd.com/N80314
    Your personal page (using TOR): paytordmbdekmizq.onion/N803i4
    Your personal identification number (if you open the site (or TOR 's) directly): N803i4

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

Maybe you are looking for

  • HP UFT 12.02 not installing on Windows 7 Service Pack 1

    HP UFT 12.02 is not installing on Windows 7 Service Pack 1. But the Install Guide says it supports and recommends Windows 7 Service Pack 1 as the Operating System.

  • AFP-High CPU Load-Not Using Home Directories-10.5.6

    We recently rolled out a Leopard File server (AFP, SMB services only) this past Monday using 10.5.6. We have about 30 AFP and 15 SMB users. We have 5 Apple XRAIDS connected through a Sanbox 5200 switch to the Leopard server. We are not using home fol

  • JPA and table names

    Hello, are there any possibilities to use the same table names in different SAP JPA EJB? For example, the first project has entity with a name History and the table name is TMP_HISTORY. The second one has also the entity History with a table name TMP

  • Colour management for dummies please

    I have seen many discusions about ink limits and colour profiles but can anyone offer a  dummies' guide?! I use CS5 and in Bridge it is set to Europe Prepress 3. My understanding is that this should take care of things but when I make a PDF of my job

  • Using FIDCC1 for Inbound FI docs

    Hey All, Im trying to suggest to our clients that a 3rd party interface into SAP 4.7B using flat files / BDC sessions, can be replaced by using IDOC Type FIDCC1. However, I'm told that this is a very difficult thing to do and basically when we try to