Results 1 to 2 of 2

Thread: Active X OLE Microsoft Word Object Issue

  1. #1

    Thread Starter
    Lively Member Xman51's Avatar
    Join Date
    Mar 2005
    Location
    Tampa, FL USA
    Posts
    88

    Exclamation Active X OLE Microsoft Word Object Issue

    Please help,

    I have a form that has an OLE object which I am loading a Microsoft word File from a command dialog. The Problems are, (1) I would like a user to be able to save the word file, (2) it keeps refreshing in the window to the top of the document, and (3) there are no scroll bars for the file. Here is the code for my form:


    VB Code:
    1. Private Sub Form_Load()
    2. Dim sFile As String
    3.  
    4. With dlgCommonDialog
    5. .DialogTitle = "Open"
    6. .CancelError = False
    7. .Filter = "All Files (*.*)|*.*"
    8. .ShowOpen
    9. If Len(.FileName) = 0 Then
    10. Me.Hide
    11. Exit Sub
    12. End If
    13. sFile = .FileName
    14. End With
    15. OLE1.SourceDoc = sFile
    16. OLE1.CreateEmbed sFile
    17. Me.Caption = sFile
    18. Me.Top = 0
    19. Me.Left = 0
    20.  
    21. Form_Resize
    22. End Sub
    23.  
    24.  
    25. Private Sub Form_Resize()
    26. On Error Resume Next
    27. With OLE1
    28. .Height = 10000
    29. .Width = 10000
    30. End With
    31. End Sub
    Thanks,

    Xman

  2. #2

    Thread Starter
    Lively Member Xman51's Avatar
    Join Date
    Mar 2005
    Location
    Tampa, FL USA
    Posts
    88

    Unhappy Re: Active X OLE Microsoft Word Object Issue

    Did I mention the form is in VB6 (Not VBA)?!?!!?

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