Re: ODBC problem with Microsoft Word and Excel - Mailing list pgsql-odbc

From david.paulo
Subject Re: ODBC problem with Microsoft Word and Excel
Date
Msg-id 1444196827343-5869049.post@n5.nabble.com
Whole thread Raw
In response to ODBC problem with Microsoft Word and Excel  ("Karl Denninger" <karl@denninger.net>)
List pgsql-odbc
Here is what I needed to do
1) Use ANSI odbc driver - this is key  - Unicode does not work - I am using
version 9.03.04.00.  In this example the name of the odbc DSN is LFData.  It
has a username and password embedded in it.
2) It may not be needed for word merge (I am also doing separate queries)
but I registered Microsoft ActiveX Data Objects 6.1 Library from the VBA
Tools menu
3) Within the macro that performs the merge I have the following (xcfPax is
a view that provides the fields for the merge):
    SQLRequest = "select * from xcfPax where matterno = '" & matterRef & "'"

    Doc.MailMerge.MainDocumentType = wdFormLetters
    Doc.MailMerge.Destination = wdSendToNewDocument

    Doc.MailMerge.OpenDataSource _
      Name:="", _
      SQLStatement:=SQLRequest, _
      AddToRecentFiles:=False, _
      Connection:="DSN=LFData", _
      SubType:=wdMergeSubTypeWord2000

    ' Execute the mail merge.
    Doc.MailMerge.Execute
    Doc.MailMerge.DataSource.Close




--
View this message in context:
http://postgresql.nabble.com/ODBC-problem-with-Microsoft-Word-and-Excel-tp2189996p5869049.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


pgsql-odbc by date:

Previous
From: Aravindh Varadharaju
Date:
Subject: Re: Issue with TPT and Postgresql ODBC Driver
Next
From: Vadym Krevs
Date:
Subject: SQL_DATA_AT_EXEC processing broken for large objects in nightly git