Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
save QM code as a word file
#3
for  #1 and #2
 
Macro Macro36
Trigger Aw     Help - how to add the trigger to the macro
Code:
Copy      Help
men 33354 id(2213 _hwndqm) ;;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("HTML Format")
_s.findreplace(".i{color:#e0e0e0;text-decoration:underline}" ".i{color:#ffffff;text-decoration:underline}") ;;Set the underline color to white
_s.setclip("HTML Format")

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)

app.Selection.WholeStory()
app.Selection.ParagraphFormat.Borders.Item(wdBorderLeft).LineStyle = wdLineStyleNone
app.Selection.ParagraphFormat.Borders.Item(wdBorderRight).LineStyle = wdLineStyleNone
app.Selection.ParagraphFormat.Borders.Item(wdBorderTop).LineStyle = wdLineStyleNone
app.Selection.ParagraphFormat.Borders.Item(wdBorderBottom).LineStyle = wdLineStyleNone
app.Selection.ParagraphFormat.Borders.Item(wdBorderHorizontal).LineStyle = wdLineStyleNone
doc.Content.ParagraphFormat.Borders.Item(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


Messages In This Thread
save QM code as a word file - by macman - 01-18-2021, 08:05 AM
RE: save QM code as a word file - by macman - 01-19-2021, 12:53 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 01:37 AM
RE: save QM code as a word file - by macman - 01-19-2021, 03:09 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 05:33 AM
RE: save QM code as a word file - by macman - 01-19-2021, 11:07 PM
RE: save QM code as a word file - by macman - 01-20-2021, 08:37 AM
RE: save QM code as a word file - by macman - 01-21-2021, 05:29 AM
RE: save QM code as a word file - by Kevin - 01-21-2021, 08:29 AM
RE: save QM code as a word file - by macman - 01-21-2021, 08:39 AM
RE: save QM code as a word file - by macman - 01-21-2021, 10:12 AM
RE: save QM code as a word file - by macman - 01-22-2021, 06:25 AM
RE: save QM code as a word file - by Kevin - 01-22-2021, 11:44 PM
RE: save QM code as a word file - by macman - 01-23-2021, 12:34 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:42 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:49 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:53 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:58 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)