Graphics filter error message in VBA with W2002

V

Vivian Carroll

I created a template with a macro that opens the Insert, Picture, From File
dialog and if the user clicks Insert, it is supposed to insert the picture.
This template/macro work fine in Word 2000. In Word 2002, I get "Runtime
Error 5382: The graphics filter was unable to convert this file
(../../..My%20Pictures/Word%20Options...)". I am able to insert the same
pictures (.bmp and .jpg) using Insert, Picture, From File manually - just
not via the macro. What can I do to fix this problem?

TIA,
Vivian Carroll
 
V

Vivian Carroll

I just tried moving one of the graphics to a different directory/folder and
the macro worked fine. Is there something unusual about the "My Pictures"
folder?
 
P

pre

Try this:
' Inserts a picture from a graphics file.
' Sets the View to (D)etail with SendKeys.

Dim SendKeysstring As String
' View choices [change last Sendkey Letter].
' D - (D)etails view
' G - Lar(g)e Icon view
' L - (L)ist view
' M - S(m)all Icon view
' R - P(r)operties View
' V - Pre(v)iew View
' T - (T)humbnails View
Select Case Application.Language
Case msoLanguageIDDanish
SendKeysstring = "%K{LEFT}D"
Case Else
SendKeysstring = "%L{LEFT}D" ' English
End Select

sendkeys (SendKeysstring)
Application.Dialogs(wdDialogInsertPicture).Show

pre
 
V

Vivian Carroll

Thank you.

I tried it and does change the dialog to display in detailed view. Then I
tried my original macro again and now it works too. I'm going crazy. I did
play with the template a lot today, but I don't have clue about what I did
that makes that (unchanged) macro work now!


pre said:
Try this:
' Inserts a picture from a graphics file.
' Sets the View to (D)etail with SendKeys.

Dim SendKeysstring As String
' View choices [change last Sendkey Letter].
' D - (D)etails view
' G - Lar(g)e Icon view
' L - (L)ist view
' M - S(m)all Icon view
' R - P(r)operties View
' V - Pre(v)iew View
' T - (T)humbnails View
Select Case Application.Language
Case msoLanguageIDDanish
SendKeysstring = "%K{LEFT}D"
Case Else
SendKeysstring = "%L{LEFT}D" ' English
End Select

sendkeys (SendKeysstring)
Application.Dialogs(wdDialogInsertPicture).Show

pre

Vivian Carroll said:
I created a template with a macro that opens the Insert, Picture, From File
dialog and if the user clicks Insert, it is supposed to insert the picture.
This template/macro work fine in Word 2000. In Word 2002, I get "Runtime
Error 5382: The graphics filter was unable to convert this file
(../../..My%20Pictures/Word%20Options...)". I am able to insert the same
pictures (.bmp and .jpg) using Insert, Picture, From File manually - just
not via the macro. What can I do to fix this problem?

TIA,
Vivian Carroll
 
P

pre

It´s simple. The macro you got from me is working as preset (Changes may be
set in the editor). The macro is working automatically, also when you call
the dialog box. My advice: delete your own to make sure nothing will be
disturbed.

pre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top