Baze de date
Comunicarea cu WordComunicarea cu WordMODELUL OBJECT WORD Extrase din modelul Object Word.( Collections si Object).
OBIECTE SI COLECTII WORD
COLECTIA DOCUMENTS Metode: Colectia Documents este compusa din toate obiectele Document deschise in Word:
OBIECTELE DOCUMENT Un obiect Document permite cearea unei referinte la un document Word. Active Document desemneaza documentul activ. Metode:
Obiecte si colectii:
Private Sub Word_Bold() Dim appWord As New Word.Application With appWord .Documents.Open”C:Clientigabi.doc” .ActiveDocument.Select .Selection.Font.Bold = True .ActiveDocument.Close wdSaveChange .Quit End With End Sub Lansarea unui MailMerge. Private Sub Relatii() Dim appWord As Word.Application Dim docWord As Word.Document `lansarea in Word Set AppWord = New Word.Application appWord.Visible = True `deschiderea unei scrisori tip Set docWord = appWord.documents.Open („C:clientigabi.doc”) `pregatirea unei scrisori tip pentru toti clientii With docWord.MailMerge .Destination = wdSendNewDocument .SuppressBlankLines = True With .DataSource .FirstRecord = wdDefaultFirstRecord .LastRecord = wdDefaultLastRecord End With `lansarea unei scrisori tip .Execute End With End Sub
|