Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21917

Conflict between vb6 and microsoft word

$
0
0
Hi Folk

I 'm coding vb6 and use Codejock commandbar' OCX to make menu and shortcut menu .it's work good ,but i need to add Microsoft word 10 reference to project for export data to Microsoft word. when i use this reference library vb6 generate compile error "Object Dose Not Source Automation Events" and it dose not run project unless remark below codes

i did use this code to make shortcut:

Code:

Public WithEvents KeyBindings As KeyBindings

 Set KeyBindings = CommandBars.KeyBindings
 KeyBindings.AddShortcut ID_FILE_Snapshot, "Ctrl+W"

i decide to use Form_KeyDown to generate shortcut such as this code

Code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
                      Case vbKeyF10
            KeyCode = 0
            frmbackup.show
    End Select
End Sub

but this code does not work,cause i did use MDI form and as you know there is no Key preview property in this form .

pls make suggestion what should i do ?

thank's all

Viewing all articles
Browse latest Browse all 21917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>