Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycbkw-0007lW-Ri for pgsql-general@arkaria.postgresql.org; Mon, 30 Mar 2015 15:37:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ycbkw-0001Ea-Af for pgsql-general@arkaria.postgresql.org; Mon, 30 Mar 2015 15:37:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ycbku-0001EM-Mm; Mon, 30 Mar 2015 15:37:37 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Ycbkp-0008DT-Rx; Mon, 30 Mar 2015 15:37:33 +0000 Received: by wgbgs4 with SMTP id gs4so88614356wgb.0; Mon, 30 Mar 2015 08:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OVKpNlopHo1I2nMnvn37BoXIO+wzum7mBCXuQek5eFQ=; b=BsHZoq+aQ4tNBr5RpGjE0e0tK46TwgYJVxuFTNbvyeuNtMa+di+x6qrmrZ/xZJ+SXQ Ka0+qc4aGliLVTK2/DUlWs3kXMhBHaYhFtmnejqbHthkPQpLAamZicuk9xaFWu5CV89/ Sp7XenCjA+qUKpSe0yiZnWpfEodFRc3BEd/4pja2ZDz9CFVKafjnw5Kr34SVZiKixM0Z WtqGdXxdXEeH7I/aXyzJouLsQuttkv9zgsdd4PctNp8Aoi9ewnCZ/WSwDnMjJGF1mdpj 1uqXJveAh18kmV80Tyon/xB8/lcMnCORlXUeKsVfhcyTbRRC71YvmHP35DdwrfUiJ9bJ rQRg== X-Received: by 10.195.13.104 with SMTP id ex8mr63899954wjd.12.1427729849790; Mon, 30 Mar 2015 08:37:29 -0700 (PDT) Received: from [192.168.1.150] (72.16.199.178.dynamic.wline.res.cust.swisscom.ch. [178.199.16.72]) by mx.google.com with ESMTPSA id d9sm16204748wib.20.2015.03.30.08.37.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 08:37:28 -0700 (PDT) Message-ID: <55196DB8.6090501@gmail.com> Date: Mon, 30 Mar 2015 17:37:28 +0200 From: Vincenzo Campanella User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Vincent Veyron , avpro avpro CC: pgsql-novice@postgresql.org, pgsql-sql@postgresql.org, pgsql-general@postgresql.org Subject: Re: [SQL] Re: Link Office Word form document with data from PostgreSQL References: <20150330150121.39fc80c1614692b758a6aae3@wanadoo.fr> In-Reply-To: <20150330150121.39fc80c1614692b758a6aae3@wanadoo.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Il 30.03.2015 15:01, Vincent Veyron ha scritto: > Hi, > > I use Perl for this. The process is : > > -unzip the .docx document, and look for /word/document.xml in the resulting directory > -substitute field names with their values in this file (I don't use MS Word 'fields', though, just placeholders that are unlikely to be found in documents, such as client_name, client_address, facturation_date, etc) > -zip the archive anew with a .docx extension > > VoilĂ . > > The code is about 40 lines long, I can post it if you care; the same process also works with Libre/OpenOffice documents > Hi Vincent, could you please post the code? That would be very nice. Thank you vince -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general