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
typelibWord{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)
typelibWord{00020905-0000-0000-C000-000000000046}8.0 Word.Application app._getactive;;connect to Word. Note: need the /exe 1. Word.Document doc=app.ActiveDocument
doc.ActiveWindow.Panes(1).Selection.Cut
The following VBA code can run successfully, but the QM code is still error
Sub FormatFirstParagraph()
Dim aRange As Range
Set aRange = ActiveDocument.Range(Start:=ActiveDocument.Paragraphs(2).Range.Start, End:=ActiveDocument.Paragraphs(4).Range.End)
With aRange
.Bold = True
.ParagraphFormat.Alignment = wdAlignParagraphCenter
With .Font
.Name = "Stencil"
.Size = 15
End With
End With
End Sub
typelibWord{00020905-0000-0000-C000-000000000046}8.0 Word.Application app._getactive;;connect to Word. Note: need the /exe 1. Word.Document doc=app.ActiveDocument ;doc.ActiveWindow.Panes(1).Selection.Cut Word.Range ran=doc.Range(Start=doc.Paragraphs(2).Item.Range.Start, End:=doc.Paragraphs.Item(4).Range.End)
ran.Bold="True"
ran.Font.Size=15
ran.Font.Name="Stencil"
Gintaras Wrote:doc.ActiveWindow.Panes.Item(1).Selection.Cut
Hello, can i use the "pointer" to solve the following constituency question? can you give me an example? This question bothers me for many days, thank you very much
typelibWord{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=doc.Paragraphs.Item(2).Range.Start End=doc.Paragraphs.Item(4).Range.End)
ran.Bold="True"
ran.Font.Size=15
ran.Font.Name="Stencil"
;/exe 1 out typelibWord{00020905-0000-0000-C000-000000000046}8.0 Word.Application app._getactive;;connect to Word. Note: need the /exe 1. Word.Document doc=app.ActiveDocument VARIANT StartRange=doc.Paragraphs.Item(2).Range.Start VARIANT EndRange=doc.Paragraphs.Item(4).Range.End Word.Range ran=doc.Range(StartRange EndRange)
ran.Bold=1
ran.Font.Size=15
ran.Font.Name="Stencil"
;/exe 1 out typelibWord{00020905-0000-0000-C000-000000000046}8.0 Word.Application app._getactive;;connect to Word. Note: need the /exe 1. Word.Document doc=app.ActiveDocument VARIANT StartRange=doc.Paragraphs.Item(2).Range.Start VARIANT EndRange=doc.Paragraphs.Item(4).Range.End Word.Range ran=doc.Range(StartRange EndRange)
ran.Bold=1
ran.Font.Size=15
ran.Font.Name="Stencil"
Do You know the following VBA code, how to modify the QM code? thanks in advance