+ Reply to Thread
Results 1 to 3 of 3

check if a frame/table exist

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    4

    check if a frame/table exist

    hello, currently working on how to use VBA/Macros to insert a table or frame into MS Word. i already have a code to create and insert a table and a frame at specific locations within my word document. But since the Macro will be run several times, i want to be able to check if the frame/ table exists before it inserts another frame, something like this

    if frame exists then
    skip add frame/table module
    else
    add frame
    end if

    here is my code

    Please Login or Register  to view this content.
    now i want to be able to check if the frame exists, skip the addFrame procedure and continue with inserting an object into the table.

    Thanks.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: check if a frame/table exist

    It's fairly basic, really, though I don't see why you need a frame:
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    Nigeria
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: check if a frame/table exist

    Thank you very much macropod. I do understand i don't really need a frame, but a frame is the best way to manage what i'm doing since the i have not yet figured a way around using the OLE Object.

    Okay so what i really want to do is embed/link an MS Project file in My Ms word file i use in reporting projects but currently when i import the OLE Object (MS Project) without the frame, by the time i click outside the MS Project window to return to MS Word, it zooms the project window (treats it like an image) and cuts off part of the Gantt chart which makes reporting very inaccurate, so i decided to put the OLE Object within the frame which tends to help me manage the MS Project window.

    so here is the code snippet for just embedding the MS Project window without the frame for you to see how it behaves, and please i don't mind having your suggestion if there is a way to have a fixed window size which adequately contains the MS Project window without the current limitations i'm having.

    Please Login or Register  to view this content.


    Note: i have attached the updated/current file i am working with right now so you can view and make your comments.

    Thanks.
    Attached Files Attached Files

+ 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