WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Word crashes on shape.delete

 
   Home -> Office -> Application Errors RSS
Next:  Word documents open slowly from Explorer  
Author Message
Cor van der Bliek

External


Since: Feb 27, 2007
Posts: 5



(Msg. 1) Posted: Wed Aug 27, 2008 3:07 am
Post subject: Word crashes on shape.delete
Archived from groups: microsoft>public>word>application>errors (more info?)

When I run this sub Word 2007 (Vista) crashes on the line that reads:
oShape1.Delete

Any ideas?

Sub Huisstijl_logox_nv()
Dim oSec1 As Word.Section
Dim oHead1 As Word.HeaderFooter
Dim oShape1 As Word.Shape
If Documents.Count = 0 Then Exit Sub
Application.ScreenUpdating = False
For Each oSec1 In ActiveDocument.Sections
If oSec1.Index > 0 And oSec1.Index <= ActiveDocument.Sections.Count Then
For Each oHead1 In oSec1.Headers
For Each oShape1 In oHead1.Shapes
If Left(oShape1.Name, 7) = "Logo_nv" Then
oShape1.Delete
End If
Next
Next
End If
Next
End Sub
Back to top
Login to vote
Maitrefrodon

External


Since: Sep 23, 2008
Posts: 1



(Msg. 2) Posted: Tue Sep 23, 2008 7:56 am
Post subject: RE: Word crashes on shape.delete [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have exactly the same problem, in the Headers too.
No solution found at this time.

Bye

"Cor van der Bliek" wrote:

> When I run this sub Word 2007 (Vista) crashes on the line that reads:
> oShape1.Delete
>
> Any ideas?
>
> Sub Huisstijl_logox_nv()
> Dim oSec1 As Word.Section
> Dim oHead1 As Word.HeaderFooter
> Dim oShape1 As Word.Shape
> If Documents.Count = 0 Then Exit Sub
> Application.ScreenUpdating = False
> For Each oSec1 In ActiveDocument.Sections
> If oSec1.Index > 0 And oSec1.Index <= ActiveDocument.Sections.Count Then
> For Each oHead1 In oSec1.Headers
> For Each oShape1 In oHead1.Shapes
> If Left(oShape1.Name, 7) = "Logo_nv" Then
> oShape1.Delete
> End If
> Next
> Next
> End If
> Next
> End Sub
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Application Errors All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET