Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2005
    Tampa, FL USA

    Question Unanswered: 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:

    Private Sub Form_Load()
    Dim sFile As String

    With dlgCommonDialog
    .DialogTitle = "Open"
    .CancelError = False
    .Filter = "All Files (*.*)|*.*"
    If Len(.FileName) = 0 Then
    Exit Sub
    End If
    sFile = .FileName
    End With
    OLE1.SourceDoc = sFile
    OLE1.CreateEmbed sFile
    Me.Caption = sFile
    Me.Top = 0
    Me.Left = 0

    End Sub

    Private Sub Form_Resize()
    On Error Resume Next
    With OLE1
    .Height = 10000
    .Width = 10000
    End With
    End Sub

    '<==End Code


    Last edited by Xman51; 03-11-05 at 16:12.

Posting Permissions

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