static void writeWordData(Args _args)
{
COM document;
COM wordDocument;
COM range;
COM app;
COM font;
COM shading;
;
app = new COM(‘Word.Application’);
app.visible(true);
document = app.Documents();
wordDocument = document.add();
wordDocument.activate();
range = wordDocument.range();
range.insertBefore(‘Welcom To AX Document’);
font = range.font();
font.Size(16);
font.bold(2);
shading = font.shading();
//You can use either the integer directly or better way is to use RGB2Int
//shading.BackgroundPatternColor(65535); //Yellow
shading.BackgroundPatternColor(WinApi::RGB2int(255, 255, 0)); //Yellow
}
{
COM document;
COM wordDocument;
COM range;
COM app;
COM font;
COM shading;
;
app = new COM(‘Word.Application’);
app.visible(true);
document = app.Documents();
wordDocument = document.add();
wordDocument.activate();
range = wordDocument.range();
range.insertBefore(‘Welcom To AX Document’);
font = range.font();
font.Size(16);
font.bold(2);
shading = font.shading();
//You can use either the integer directly or better way is to use RGB2Int
//shading.BackgroundPatternColor(65535); //Yellow
shading.BackgroundPatternColor(WinApi::RGB2int(255, 255, 0)); //Yellow
}
No comments:
Post a Comment