Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Delete first page of word document

Posted on 2004-04-05
3
324 Views
Last Modified: 2012-05-04
I have files that have information about the file as the fiirst page of the document.  We read this area populate a database with the information.  After the database has been updated I want to delete this first page.  I need some code that will delete the first page of a ms word document.
0
Comment
Question by:gdismukes
3 Comments
 
LVL 4

Accepted Solution

by:
chinhdo1 earned 250 total points
ID: 10765589
I guess you already have code to open the Word doc, read data from it, etc. To delete the first page, perhaps you can use the Macro below. Basicall, it nagivates to page 2, then select from there to the top of the document, then delete the selection. This code was generated using Word 2002. If you don't have Word 2002, you can always use the Macro Record function.

Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="2"
Selection.Find.ClearFormatting

Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
send messages to whatsapp programatically 2 62
Install Problem 13 34
"Emulate" TAB key when press Enter Key 3 46
Where does legacy ASP.NET initialize language? 2 22
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question