plannernomad.blogg.se

Ms word 2016 quick parts database table format
Ms word 2016 quick parts database table format











ms word 2016 quick parts database table format ms word 2016 quick parts database table format

Then you might hope that you could copy user1.odc to my.odc, open Word, and have it connect to table1, then copy user2.odc to my.odc, reopen the document, and it would be connected to table2. odc called user2.odc that connects to table2. So for example, suppose your Word document has connected to the data source using a. odc does not even really provide any form of useful indirection. odc format, not the current one, and does not interpret its contents correctly - as you say, it does not recognise a query in there, and wrongly uses the meta name as the source of the table name. I think you have pretty much got it right.ĪFAICR Word only recognises the older. (It's probably easier to do that in Excel, though). But you could probably still use MS Query to help you construct your SQL. MS Query only works for ODBC queries, and they do not always work correctly when you actually issue the query using ODBC from Word, because of a Word problem to do with Unicodeįields in SQL Server. Query option now, and I am not sure it works with the latest versions of Word). That may still be possible (it is a bit harder to find the MS in the COnnection:= parameter in OpenDataSource.Īs background, until Word 2000, by default you would use MS Query to create your SQL query, and MS Query does have facilities that can help you build your query (a bit like the ones in MS Access). you may need to quote all your table names. You get a maximum of either 255 or around 511 characters in the SQL statement, and Word tends to impose some syntax requirements that Transact-SQL does not, so e.g. SQLStatement1:="put the second part in here" SQLStatement:="put your SQL statement in here, and if it is long.", _ Let's say it is called "c:\a\myodc.odc" Then in VBA you can use something likeĪctiveDocument.OpenDataSource Name:="c:\a\myodc.odc, _ needed to connect to the correct server and database. odc (Office Data Connection file) which has the info. You either have to be able to create a View in SQL Server that performs the query you need, then connect to that, or you have to be able to create the correct query manually (or perhaps using some other query tool that can help you), then use VBA to connectįor example, if you have been through the connection process once (connecting to a single table) then you will have a. If you set the option to Never, then fields are never shaded, and (conversely) Always specifies that they are always shaded.Word and the current data source dialog do not really give you any help with that. The default is When Selected, which simply means that the field is shaded when it is selected, or you place the insertion point within the field. There are three options you can specify in step 3. In the Show Document Content section, use the Field Shading drop-down list to specify how you want Word to handle field shading.The Advanced options of the Word Options dialog box.

ms word 2016 quick parts database table format

At the left of the dialog box click Advanced.In Word 2010 or a later version, display the File tab of the ribbon and then click Options.) (In Word 2007 click the Office button and then click Word Options.

ms word 2016 quick parts database table format

If you want to change the way that Word handles field shading, follow these steps: Sometimes you may find this distracting, however. This is done so you can tell you are working in a field. Normally, when you either select a field or move the insertion point into a field, Word highlights the entire field or result of the field.













Ms word 2016 quick parts database table format