In qm3, it is very easy to create a doc document with the following code, It refers to GemBox.Document.dll component
note:
Set DLL path: C:\Users\Administrator\Desktop\GemBox.Document.dll
Set Doc path: C:\Users\Administrator\Desktop\hello.docx
How to reference DLL component in C # code for QM2? Thanks in advance
In addition, how to generate DLL, exe, code formatting? in qm3
Qm3 is very good and promising
QM3 code:
QM2 Code:
Macro M3
Trigger A3
note:
Set DLL path: C:\Users\Administrator\Desktop\GemBox.Document.dll
Set Doc path: C:\Users\Administrator\Desktop\hello.docx
How to reference DLL component in C # code for QM2? Thanks in advance
In addition, how to generate DLL, exe, code formatting? in qm3
Qm3 is very good and promising
QM3 code:
C# code:
// script "doc_cs.cs" /*/ r C:\Users\Administrator\Desktop\GemBox.Document.dll; /*/ //.
using Au; using System; using GemBox.Document;
partial class Script : AScript { [STAThread] static void Main(string[] a) => new Script(a); Script(string[] args) { //;;;
// If using Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
DocumentModel document = new DocumentModel();
Section section = new Section(document);
document.Sections.Add(section);
Paragraph paragraph = new Paragraph(document);
section.Blocks.Add(paragraph);
Run run = new Run(document, "Hello World!");
paragraph.Inlines.Add(run);
document.Save(@"C:\Users\Administrator\Desktop\hello.docx");
}
}
QM2 Code:
Macro M3
Trigger A3
CsScript x.AddCode("")
x.Call("Program.Main")
#ret
using GemBox.Document;
class Program
{
,static void Main()
,{
,,// If using Professional version, put your serial key below.
,,ComponentInfo.SetLicense("FREE-LIMITED-KEY");
,,DocumentModel document = new DocumentModel();
,,Section section = new Section(document);
,,document.Sections.Add(section);
,,Paragraph paragraph = new Paragraph(document);
,,section.Blocks.Add(paragraph);
,,Run run = new Run(document, "Hello World!");
,,paragraph.Inlines.Add(run);
,,document.Save(@"C:\Users\Administrator\Desktop\hello.docx");
,}
}