03-14-2017, 08:37 AM
I want to convert VBA code into Qm code, but there is a mistake, because I programming level is not good, plagued me for many days, I hope someone can help me, thank you very much :oops:
VBA code:
Sub SetNewRange()
Dim ran As Range
Set ran = ActiveDocument.Range(Start:=0, End:=10)
End Sub
QM code:
Macro Macro1
Trigger SF9
VBA code:
Sub SetNewRange()
Dim ran As Range
Set ran = ActiveDocument.Range(Start:=0, End:=10)
End Sub
QM code:
Macro Macro1
Trigger SF9
;/exe 1
out
typelib Word {00020905-0000-0000-C000-000000000046} 8.0
Word.Application app._getactive ;;connect to Word. Note: need the /exe 1.
Word.Document doc=app.ActiveDocument
Word.Range ran=doc.Range(Start=0 End=10)
out ran
;BEGIN PROJECT
;main_function Macro1
;exe_file $my qm$\Macro1.qmm
;flags 6
;guid {EB126AB4-AFF9-4818-9E31-A62869FFF810}
;END PROJECT