Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Insert WMF file in the word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sajin - 29 May 2006 13:59 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.