1. The OLE doesnt refresh the screen as i change the embedded object for the OLE.
2. After a few times of selecting different template from the combo box, ms word prompt error message "insuffiecient memory - component cannot be display properly"
My code is written as below:
Expand|Select|Wrap|Line Numbers
- Private Sub cmbTemplate_Click()
- Const BIN = "000"
- Dim TempNo As String
- TempNo = cmbTemplate.ListIndex + 1
- Set objAppWord = Nothing
- OLE1.Close
- OLE1.Delete
- OLE1.Refresh
- OLE1.CreateEmbed App.Path & "\template\T" & TempNo & ".doc"
- OLE1.SizeMode = vbOLESizeStretch
- OLE1.Verb = vbOLEShow
- OLE1.DoVerb (vbOLEShow)
- OLE1.Refresh
- End Sub
Is there anybody know the solution, please give me a hand, thank you.