Screen Capture of All User Forms on Project - Error Trying to Show the Forms

  • Hi, all.

    I'm trying to automate the creation of a Word document that includes, for each user form on a project a screen capture of the form followed by the user form's code.

    No problems regarding the code part, I already did that.

    For the screen capture part I had though of activating each form in turn and using code found here to capture the screen, but I get an error when I try to activate the form. The error reads: "Runtime error 438 Object doesn't support this propertyor method".

    I'm using code like the following (sorry for lack of indenting, the post editor keeps removing it):



    Any help will be appreciated.

    Thanks in advance,

    Jorge Zaldívar.

  • Re: Screen Capture of All User Forms on Project - Error Trying to Show the Forms


    Hi jzaldivar,
    Nice to meet you.
    Have you checked "Microsoft Visual Basic for Aplplications Extensibility 5.3" reference from VBE Tools?
    Regards, junho

  • Re: Screen Capture of All User Forms on Project - Error Trying to Show the Forms


    Jorge,


    Welcome to Ozgrid.
    Thanks for attempting to use code tags on your first post.


    The correct ending code tag is: [noparse][/code][/noparse]
    You used a \ character instead of /

  • Re: Screen Capture of All User Forms on Project - Error Trying to Show the Forms


    Quote from junho lee;532270

    Hi jzaldivar,
    Have you checked "Microsoft Visual Basic for Aplplications Extensibility 5.3" reference from VBE Tools?



    Thanks for your answer. The reference for "Microsoft Visual Basic for Aplplications Extensibility 5.3" is checked. In fact, the code extraction part of the code (not posted) is working.

    That part is somethig like:



    Any other sugestion?

    Regards,

    Jorge.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!