Hi all,
I'am trying to insert WMF file in the word 2000 through code.
If there are more then 2 pages in the document it gives me error and
the autoshape property gets
lost of the WMF file.This WMF file can be inserted through insert
picture-> from file option.
when you do this manually the WMF gets inserted as autosahpe or else it
get inserted as picture.
The error which i get is as follows:-
Microsoft Visual Basic
---------------------------
Run-time error '-2147467259 (80004005)':
Can't move focus to the control because it is invisible, not enabled,
or of a type that does not accept the focus.
---------------------------
OK Help
Please let me know solution for this.
Thanks in advance.
-Sajin
Jezebel - 29 May 2006 14:25 GMT
You'll need to post the code if you want help finding the bug. The error
value on its own doesn't help much.
> Hi all,
>
[quoted text clipped - 18 lines]
> Thanks in advance.
> -Sajin
sajin - 29 May 2006 15:16 GMT
Here is my code
ActiveDocument.Shapes.AddPicture Anchor:=Selection.Range, FileName:= _
"C:\Program Files\Common Files\Microsoft
Shared\Clipart\autoshap\bd18194_.wmf" _
, LinkToFile:=False, SaveWithDocument:=True