Results 1 to 10 of 10

Thread: View Word & Excel in form w/o OLE.

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2012
    Posts
    47

    View Word & Excel in form w/o OLE.

    guys i know there's a lot of topics about this in google but i still cant find any accurate solution to my program. i'm trying to show the users an attachments (which is word or excel files). at first i thought using pdfs would be good but when excel is converted to pdf some contents are not shown. do you guys have any alternatives on how to show these files in a vb form? Any advices would be considered. Thank you!

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: View Word & Excel in form w/o OLE.

    you could use the copypicture method of a range, then copy from clipboard to a picturebox
    there would be several similar alternatives, including a screen snapshot of a particular area, either of which could be saved to file first then loaded into a picturebox or similar
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2012
    Posts
    47

    Re: View Word & Excel in form w/o OLE.

    u mean i have to capture an image of the document? then show that image in the picturebox? am i getting it right?

  4. #4
    New Member
    Join Date
    Dec 2012
    Posts
    13

    Re: View Word & Excel in form w/o OLE.

    Does the Word or Excel document absolutely have to reside within the form? Could you not check for an existing Word or Excel instance and launch the files into that, bringing it to the front - or if no instance open Word or Excel and pass the filename? I know there are APIs available to accomplish testing for an instance, opening an instance, and bringing it to the front.

  5. #5
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: View Word & Excel in form w/o OLE.

    -- I think that he/she means that to have a fully working ActiveX Control Object of Word or Excel in the Form, using OLE processes, right???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  6. #6
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: View Word & Excel in form w/o OLE.

    maybe using SetParent API? you would need to find its hWnd first tho and then set parent into a form/picturebox/frame

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2012
    Posts
    47

    Re: View Word & Excel in form w/o OLE.

    ahm yes that's what i meant guys. i want the doc inside a window or something, with that the user can only view it just like a picture but can navigate through that document though. do you know any activex (preferably free) that i can use?

  8. #8
    Junior Member
    Join Date
    Sep 2012
    Location
    Cascais, Portugal
    Posts
    31

    Re: View Word & Excel in form w/o OLE.

    I'm a bit confused, dexjel. Do you want to use OLE or not?

  9. #9
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: View Word & Excel in form w/o OLE.

    another suggestion which might work is use a program from inside vb6 (example: excel) save as .jpg temporary (all this would be done either invisible or off screen) so you dont see then simply open the temporary jpg file in picturebox?

    cannot try at the moment, i am away from pc

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: View Word & Excel in form w/o OLE.

    ahm yes that's what i meant guys. i want the doc inside a window or something, with that the user can only view it just like a picture but can navigate through that document though. do you know any activex (preferably free) that i can use?
    that sounds exactly like an ole control, from tool box
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width