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:
Thanks,VB Code:
Private Sub Form_Load() Dim sFile As String With dlgCommonDialog .DialogTitle = "Open" .CancelError = False .Filter = "All Files (*.*)|*.*" .ShowOpen If Len(.FileName) = 0 Then Me.Hide Exit Sub End If sFile = .FileName End With OLE1.SourceDoc = sFile OLE1.CreateEmbed sFile Me.Caption = sFile Me.Top = 0 Me.Left = 0 Form_Resize End Sub Private Sub Form_Resize() On Error Resume Next With OLE1 .Height = 10000 .Width = 10000 End With End Sub
Xman




Reply With Quote