Reply
 
Thread Tools Display Modes
  #1   Report Post  
nw_nick
 
Posts: n/a
Default How do I write a macro to find, select, and then delete a Section.

I have a document in Word that is a form to fill out with instructions. I've
placed all the instructions in the same section, separate from the form. I
want a macro that will go bact to the Instructions section, and then delete
that section, so what is left is the one page form.

anyone write a macro like that?

Thanks!
  #2   Report Post  
Shauna Kelly
 
Posts: n/a
Default

Hi nw_nick

Try something like this:
ActiveDocument.Sections(1).Range.Delete

For testing, make a backup of your document before you begin!

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"nw_nick" wrote in message
...
I have a document in Word that is a form to fill out with instructions.
I've
placed all the instructions in the same section, separate from the form.
I
want a macro that will go bact to the Instructions section, and then
delete
that section, so what is left is the one page form.

anyone write a macro like that?

Thanks!



  #3   Report Post  
nw_nick
 
Posts: n/a
Default

Shauna:
You're a genius! That is exactly what I needed and it works perfectly!

Thank you very much
Nick

"Shauna Kelly" wrote:

Hi nw_nick

Try something like this:
ActiveDocument.Sections(1).Range.Delete

For testing, make a backup of your document before you begin!

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"nw_nick" wrote in message
...
I have a document in Word that is a form to fill out with instructions.
I've
placed all the instructions in the same section, separate from the form.
I
want a macro that will go bact to the Instructions section, and then
delete
that section, so what is left is the one page form.

anyone write a macro like that?

Thanks!




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:23 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"