| | auteurs : blondelle, pottiez, firejocker |
Cette procédure permet de choisir le type d'alignement souhaité.
Il faut ici passer l'instance de Word et non celle du document.
vMSWord.OlePropertyGet("Selection").OlePropertyGet("ParagraphFormat").OlePropertySet("Alignment", "0");
vMSWord.OlePropertyGet("Selection").OlePropertyGet("ParagraphFormat").OlePropertySet("Alignment", "1");
vMSWord.OlePropertyGet("Selection").OlePropertyGet("ParagraphFormat").OlePropertySet("Alignment", "2");
vMSWord.OlePropertyGet("Selection").OlePropertyGet("ParagraphFormat").OlePropertySet("Alignment", "3");
|
|
| | auteurs : blondelle, pottiez, firejocker |
Cette procédure permet de déplacer le curseur X fois dans la direction souhaitée.
Par exemple ("MoveUp", 5, 1) déplace le curseur vers le haut d'une ligne : ("MoveUp", ligne, count).
Pour un caractère ("MoveLeft", 1, 1) déplace le curseur vers la gauche d'un caractère : ("MoveLeft", caractere, count).
vMSWord.OlePropertyGet("Selection").OleFunction("MoveUp", 5, 1);
vMSWord.OlePropertyGet("Selection").OleFunction("MoveDown", 5, 1);
vMSWord.OlePropertyGet("Selection").OleFunction("MoveLeft", 1, 1);
vMSWord.OlePropertyGet("Selection").OleFunction("MoveRight", 1, 1);
|
|
| | auteurs : blondelle, pottiez |
Cette procédure permet de figer ou de rétablir la mise à jour de l'écran.
vMSWord.OlePropertySet("ScreenUpdating", false);
vMSWord.OlePropertySet("ScreenUpdating", true);
|
|
| | auteurs : blondelle, pottiez, firejocker |
Cette procédure fait un saut à la page souhaitée.
vMSWord.OlePropertyGet("Selection").OleProcedure("Goto", 1, 2, 2);
|
|
| | auteurs : blondelle, pottiez |
Cette procédure fait un saut au début du fichier.
vMSWord.OlePropertyGet("Selection").OleProcedure("HomeKey", "6");
|
|
| | auteurs : blondelle, pottiez, firejocker |
Cette procédure fait un saut en fin du fichier.
vMSWord.OlePropertyGet("Selection").OleProcedure("EndKey", "6");
|
|
| | auteurs : blondelle, pottiez, firejocker |
Cette procédure permet de sauter des lignes.
int i;
i = 0;
for ( i; i < 5; i++)
{
vMSWord.OlePropertyGet("Selection").OleProcedure("TypeParagraph");
}
|
|
| | auteurs : blondelle, pottiez |
Cette procédure permet d'aller au début de la ligne.
vMSWord.OlePropertyGet("Selection").OleProcedure("HomeKey", "5");
|
|
| | auteurs : blondelle, pottiez |
Cette procédure permet d'aller en fin de ligne.
vMSWord.OlePropertyGet("Selection").OleProcedure("EndKey", "5");
|
|
| | auteurs : blondelle, pottiez, firejocker |
Cette procédure permet de changer l'orientation de la page
wdOrientLandscape = 1 ,wdOrientPortrait = 0
vWDocument.OlePropertyGet("PageSetup").OlePropertySet("Orientation", "1");
vWDocument.OlePropertyGet("PageSetup").OlePropertySet("Orientation", "0");
|
|
| | auteurs : blondelle, pottiez |
Cette procédure permet de créer des étiquettes de réexpédition.
String Name = "C2160";
String addr = "Dave Edson \r\n123 Skye St. \r\nOur Town \r\nWA 98004";
Variant AutoText = "";
Variant ExtractAddress = false;
vMSWord.OlePropertyGet("MailingLabel").OleFunction("CreateNewDocument", Name.c_str(), addr.c_str(), WideString(AutoText), ExtractAddress);
|
|
| | auteurs : blondelle, pottiez |
Cette procédure permet de créer des enveloppes avec le nom et adresse de l'expéditeur et le nom et adresse du destinataire.
String addr = "Don Funk \r\n123 Skye St. \r\nOur Town \r\nWA 98040";
String AutoText = "";
String retaddr = "Karin Gallagher \r\n123 Main \r\nOther Town \r\nWA 98004";
vWDocuments.OleFunction("Add").OlePropertyGet("Envelope").OleFunction("Insert", false, addr.c_str(), AutoText.c_str(), false, retaddr.c_str());
vMSWord.OlePropertyGet("ActiveWindow").OlePropertyGet("View").OlePropertySet("Type", 3);
|
|
Consultez les autres F.A.Q's
 
|
|