Now, in any QM code, pressing the ALT + W hotkey saves the code as a word file
There is only two problem left unsolved
1.Sets the color of tab underline
line 12-15
2.Set paragraph border to none
line 26-34
Does anyone know some details of converting VBA code into QM code? thanks a lot
Macro Macro9
Trigger Aw
There is only two problem left unsolved
1.Sets the color of tab underline
line 12-15
2.Set paragraph border to none
line 26-34
Does anyone know some details of converting VBA code into QM code? thanks a lot
Macro Macro9
Trigger Aw
int w1=id(2213 win("" "QM_Editor"))
men 33354 w1 ;;Copy HTML
typelib Word {00020905-0000-0000-C000-000000000046} 8.0
Word.Application app._create
str WordDoc="$desktop$\\test.docx"
VARIANT vWordFile=WordDoc.expandpath
Word.Document doc = app.documents.Add()
;_s.getclip
;;out _s
;_s.findreplace("e0e0e0" "ffffff") ;;Set the underline color to white
;_s.setclip
app.Selection.Paste() ;;Paste text
doc.Content.Font.Name = "Courier New" ;;Set Font
doc.Content.Font.NameAscii = "Courier New"
doc.Content.Font.Size = 10
doc.Content.ParagraphFormat.TabStops.ClearAll ;;Set tab width
doc.DefaultTabStop=app.Application.CentimetersToPoints(0.74)
;;;;Selection.WholeStory
;;;;With Selection.ParagraphFormat
;;;;;;;;.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
;;;;;;;;.Borders(wdBorderRight).LineStyle = wdLineStyleNone
;;;;;;;;.Borders(wdBorderTop).LineStyle = wdLineStyleNone
;;;;;;;;.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
;;;;;;;;.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
;@Set paragraph border to none, Above is word VBA code
;doc.Content.ParagraphFormat.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
doc.PageSetup.LeftMargin=app.CentimetersToPoints(1) ;;set margins
doc.PageSetup.TopMargin=app.CentimetersToPoints(1)
doc.PageSetup.RightMargin=app.CentimetersToPoints(1)
doc.PageSetup.BottomMargin=app.CentimetersToPoints(1)
doc.SaveAs(vWordFile)
app.Quit()
run vWordFile