Results 1 to 11 of 11

Thread: BUG: Cannot edit Word document in OLE or WebBrowser control

  1. #1

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Resolved BUG: Cannot edit Word document in OLE or WebBrowser control

    Please follow this link and have a look

    They are suggesting following workaround.

    A workaround for this problem is to activate the Word document in its own Window, rather than using in-place activation. To accomplish this, set the MiscFlags property of the OLE control to

    vbOLEMiscFlagDisableInPlace, or 2. For example: OLE1.MiscFlags = vbOLEMiscFlagDisableInPlace

    Now when you double-click the OLE control, the Word document is activated in its own window inside Microsoft Word. To programmatically activate the Word document in its own window, use the DoVerb method as follows:

    OLE1.DoVerb vbOLEOpen
    But there is no MiscFlags property or DoVerb method for WebBrowser control. How to implement this workaround for WebBrowser control.
    Last edited by Deepak Sakpal; Oct 18th, 2005 at 02:37 AM.

  2. #2

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    anyone

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    what about trying to load it directly into word?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    strange.. when I just tried opening a doc in the webbrowser control I could edit it no problem?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    Actually i am developing an application where i load word file in webbrowser control and manage from there. But i am now facing this problem.

  6. #6

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    Quote Originally Posted by [A51g]Static
    strange.. when I just tried opening a doc in the webbrowser control I could edit it no problem?
    Load a file in webbrowser control then start word and get back to webbrowser control. you cannot edit the document or there right click menu will be disabled.

  7. #7
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    i dont get a right click to start.. but doc is still editable?

    I would still suggest using word.. then u can have full control
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  8. #8

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    Actually you can edit the document in webbrowser control while another instance of word is running but you don't get the right click menu that shows cut,copy,paste,spelling/grammar suggestions etc. That is where i am stuck on.

  9. #9
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    ahhh... gotcha. sorry.. ive never run into this.. so im not sure what the issue might be.

    but, why not just load it in word itself?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  10. #10

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: BUG: Cannot edit Word document in OLE or WebBrowser control

    In my app I am doing stuff that MS Word don't provides. I know VBA is also the way but the app i developing is going to be deployed on 150+ machine and u know we cannot provide autoupdate feature here. And another reason why i am not going for vba is the app was already developed and i am developing it furthur.

  11. #11

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Finally... I got the way to go :)

    VB Code:
    1. Dim temp As Word.Application
    2.         'Test if object is already created before calling CreateObject:
    3.         If TypeName(wrdApp) <> "Application" Then
    4.             temp = CreateObject("Word.Application")
    5.             ' wrdApp is declared below Windows Froms designer generated code
    6.             ' dim wrdApp As Word.Application
    7.             wrdApp = CreateObject("Word.Application")
    8.             temp.Quit()
    9.             temp = Nothing
    10.         End If

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