1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

writing a macro in ms word

Discussion in 'Software Development' started by anjali5, Jan 19, 2013.

Thread Status:
Not open for further replies.
  1. anjali5

    anjali5 Thread Starter

    Joined:
    Jan 19, 2013
    Messages:
    2
    Hi All,

    I want to write a macro in MS word that insert page break in the ms word document where ever there is a sentence called
    ----PAGE BREAK--- in the word document

    I have around 200 page word document where there are at least 100 PAGE BREAK sentences in the document. I want the macro that inserts the page break wherever the PAGE BREAK sentence is seen.
    Also, I want to write "THIS IS A DRAFT DOCUMENT" as the HEADER and FOOTER for the entire document.

    any help will be greatly appreciated.

    -anjali
     
  2. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Based on what you describe I believe you can use a simple find and replace.

    Find Value: ----PAGE BREAK---
    Replace Value: ^m



    Rollin
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1086047

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice