+ Reply to Thread
Results 1 to 7 of 7

Delete all Word Objects only

  1. #1
    Registered User
    Join Date
    07-30-2007
    Posts
    61

    Question Delete all Word Objects only

    Hi

    Please could someone help me?

    I need to delete all Microsoft Word document objects from my sheet, what code can I use?

    Thanks

    Roasty
    Last edited by roasty_1; 08-14-2008 at 10:50 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Roasty_1,

    Are these Word documents linked or embedded in your worksheet or are there multiple worksheets? Can you post the workbook for review? If you are using Excel 2007, please save the workbook in Excel 2003 format before posting it.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-30-2007
    Posts
    61

    Smile

    hi Leith

    Thanks for your reply

    The Word documents are embedded. I am using a combo box to select an entity, when selected - delete all word objects

    I can do it so it deletes all Objects, but this includes deleting the combo box, which is not what I want.

    Cant post spread sorry.

    Can you still help?

    cheers

    Roast

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Roasty_1,

    Give me a few minutes to write the code and check it.

    Sincerely,
    Leith Ross

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Roasty_1,

    This should do it. Works for me.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  6. #6
    Registered User
    Join Date
    07-30-2007
    Posts
    61
    Thanks for the code

    Strange thing is, works on its on, but when I try and place it in my existing code it does not work.

    Keep getting this error:

    Run-time error '1004':
    Unable to get the object property of the OLEObject class

    Any ideas?

    Thanks for your help

    roast

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Roasty_1,

    Post the code you are using. That will help me to determine the problem. If you can, the best thing would be to post the workbook.

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1