WD2000: Invalid Anchor Argument Causes IPF with AddPicture MethodID: Q204615
|
When you use the Visual Basic for Applications AddPicture method, the following error message appears:
When you click Details, the following message is displayed:This program has performed an illegal operation and will be shut down.
If the problem persists, contact the program vendor.
WINWORD caused an invalid page fault in module WINWORD.EXE at 015f:30612f3a
The problem is caused by using an invalid value for the Anchor argument of the AddPicture method.
To resolve this problem, edit the command line to use a valid argument for the Anchor argument, as in the following example:
Sub AddShapeExample()
If Documents.Count > 0 Then
With ActiveDocument.Shapes
.AddPicture FileName: = "c:\windows\Blue Rivets.bmp", _
Anchor: = Selection.Range
End With
End If
End Sub
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
For more information about the AddPicture Method, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "AddPicture Method" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic.
Additional query words: vba
Keywords : kbdta kbwordvba wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 13, 1999