|
-
May 30th, 2003, 04:33 AM
#1
Thread Starter
New Member
To delete a Word Page
Dear all,
Do any of your know how to delete a page form a word document using VB Code.
Thank alot
EricLun
-
Jun 5th, 2003, 06:40 AM
#2
Possibly.
You could try looking at recording what happens when you manually delete the page then translating to code. Pls note that its best not to cut n paste as the selection object is weird when automating. I found out this the hard way.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 12th, 2003, 12:31 AM
#3
Fanatic Member
MS Word doesn't really think in terms of pages. This is should work to delete the current page.
VB Code:
Dim rngEnd As Range
Dim rngStart As Range
Application.Browser.Target = wdBrowsePage
Application.Browser.Next
Set rngEnd = Selection.Range
Application.Browser.Previous
Set rngStart = Selection.Range
ActiveDocument.Range(rngStart.Start, rngEnd.End).Text = ""
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|