fields queries and utter disaster

C

consiglieri

OK,
Yes looking back on my posts I realize I my answers may have been
somewhat befuddled. But I have not managed to get a direct mysql query
into word, only via excel.

Guess I will keep trying to find a reasonable solution.
 
P

Peter Jamieson

As a workaround in Office 2004, the following general approach can be used
to get data via Excel. However, I am very unfamiliar with VBA on the Mac
platform and the Excel objects this macro needs, so if you want to pursue
this, you may need more expert help than I can give. In particular, I
originally tried to modify the QueryTable connection and sql from this
macro, but however I tried to do it, Word crashed, so I opted for the
simpler approach below. Also, on Mac I don't know of a way to prevent Word
from prompting for the Worksheet/range details whenever it tries to update
the DATABASE field.

1. Create a new workbook (let's call it "Macintosh
HD:Users:me:Documents:query.xls")
2. Use the data menu to insert the results of a query in Sheet1 at cell A1.
You can delete Sheets2 and 3 if you like.
3. Save and close the workbook.

4. In Word, use the database toolbar insertion feature to insert the .xls as
a DATABASE field

5. In Word's VBA editor, use Tools|References to make a reference to the
Excel object.

Create a sub as follows:

Sub GetODBCDataViaExcel()
Dim objExcel As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim strWorkbookName as String

strWorkbookName = "Macintosh HD:Users:me:Documents:query.xls"

' open the spreadsheet, refresh the table, and save the sheet
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(strWorkbookName)
objWorkbook.Worksheets(1).QueryTables(1).Refresh
objWorkbook.Close savechanges:=True
set objWorkbook = Nothing
objExcel.Quit
Set objExcel = Nothing

' Update all the fields in the body of the active Word document

ActiveDocument.COntent.Fields.Update

End Sub

It may also be worth looking at the following in Office.X:
Assuming you went through MS Query to set up the query, did your version of
MS Query allow you to save the query definition before returning the data to
Excel, or does it allow you to open a query definition file? On the Windows
version, (a) this is feasible and MS Query lets you save a .dqy or .qry file
which can be used by Word and (b), MS Query can be run as a standalone
program, but on the Office 2004 version of MS Query, it only appears to be
possible to start Query from Excel, and there is no facility to save/open
separate query definition files. I have tried creating one by hand just in
case the facility has been retained elsewhere but that doesn't work either.

Peter Jamieson
 
C

consiglieri

Hi

My version of MS Query did not allow me to save my query. It seems I
can only execute a query via excel. I can actually start MS Query as a
standalone but it doesnt let me do anything. It can neither open a file
or create a query.

I find it a bit odd that neither Office.X nor Office 2004 has a simple
method of accessing a mysql database. It would appear that OpenOffice
is ahead of Microsoft in this respect. I find this to be a sad state of
affairs. However, I shall not give up. I will see if I can get your
suggestion to work.

Once again many thanks for your effort. It is appreciated very much!
 
P

Peter Jamieson

I find it a bit odd that neither Office.X nor Office 2004 has a simple
method of accessing a mysql database.

I think it's fair to say that "Office" does, in the sense that Excel does.
I've never had the impression that Microsoft has regarded data connectivity
as a particularly important feature in Word, although they have occasionally
tried to make it easier to use, and it may be that demand for such features
on the Mac is lower than it is on the Windows version of Office (i.e. Mac
users probably do that sort of stuff some other way - I'm a realtive
newcomer to Mac so really don't know).

Peter Jamieson
 
J

Jim Gordon MVP

Hi Peter et al,

The situation with database connectivity in Office 2004 is not good, but
it has been improving.

I tried a large number of different syntax combinations with Word
fields, but I was not able to hit the jackpot getting a connection
between a Word 2004 database field and an ODBC data source. There are
some examples for Windows Word that I tried to adapt to the Mac, but my
attempts were unsuccessful. A few combinations seemed to activate a
connection dialog, but result set was unusable gibberish.

That's not to say I have the final answer to this. There might be a
syntax that works, but so far no one I know has stumbled across it. My
conclusion is that database Word fields in 2004 are broken.

There's a somewhat logical reason for this particular feature to be
broken. Unlike Windows, Mac OS does not ship with a complete set of ODBC
drivers. Since there were no ODBC drivers of any kind when Word 2004 was
built, there was no way to test to see if the database features worked
or not.

However, now there are ODBC drivers for the Mac. Microsoft has started
to support them in Office. So far that effort has resulted in a partial
implementation of MS Query. The 2004 implementation of MS Query is the
basic GUI from Office 2001, but it is far from complete. The current MS
Query is "read only." You can issue SELECT and other SQL statements
producing a result set of records, but you can't issue TABLE commands
and the like.

Concerning programmability of MS Query - there is none. It is not
scriptable with AppleScript. It will not respond to Visual Basic. The
ODBC Visual Basic add-in has not been updated to work with MS Query. You
can not save the queries as a file using the MS Query FILE menu.
However, you can use SQL view, copy the query and save any query as a
text file manually. You could write an AppleScript that controls the
menus to do this, but there is no script ability with MS Query itself.

On the positive side there are at least two software vendors who are
actively making ODBC drivers for Mac OS. Actual Technologies has a
reasonably priced one for MySQL
http://www.actualtechnologies.com/products.php

I offer the suggestion that you use MS Query with the Actual
Technologies driver and create queries in Excel worksheets that contain
the data you want to import into Word. You can programatically update
the queries as needed using VBA in Excel and also control Excel via VBA
in Word. So once you have created the queries you can refresh the
results as needed.

The data merge manager in Word will allow you to merge the records from
the fields as you described.

The work-around I am proposing is a two-stage process. The SQL queries
will be embedded into Excel worksheets. Word will use the Excel
worksheets as data sources.

I will ask the Microsoft Word team to take a look at this thread. And I
urge anyone who is interested in directly connecting Word to data
sources using Word Fields and the Data Merge Manager: please take a
moment to let Microsoft know your requirements by sending feedback to
the Mac Business Unit at this URL
http://www.microsoft.com/mac/default.aspx?pid=feedback&lang=en&app=Word

It is especially important to send this feedback *now* so that the
developers know they should pay attention to this feature as they build
the next version of Word. Mac Office 12 is now under construction, but
it is a huge undertaking. Don't expect it any time soon.

As far as future programmability is concerned, please be sure to let the
MacBU know in your database connectivity needs and that you would like
to have programmability included in the feature set of tools available
for Mac Office.

Three seperate but important public announcements from Microsoft should
be considered in your future programmability plans for Mac Office.
1. AppleScript will continued to be supported in the future.
2. Visual Basic for Applications will not be supported at some
unspecified time in the future on both PC and Mac versions of Office.
3. C# will be brought to the Mac

Because of those three facts I am not hopeful the ODBC add-in for Visual
Basic is ever going to be updated for the Mac - especially since VBA
itself will go away sooner or later. It is much more likely that we will
see a C# or AppleScript solution. Just something to think about for the
future. But no programmability solution for external databases will be
made unless the Mac BU hears from customers who want it, so please be
sure to send feedback.

Thanks.

-Jim
 
P

Peter Jamieson

Hi Jim,
A few combinations seemed to activate a connection dialog, but result set
was unusable gibberish.

I would be interested to know what these were if you happened to keep a
note. The only time I was able to get any such thing was when Word
determined that the source was a text file and started asking for
delimiters, and that was only when I tried to replicate the Windows approach
of using a .dsn file. However, since the questioner was originally asking
about Word.X perhaps you have found stuff that will work on that version.
That's not to say I have the final answer to this. There might be a
syntax that works, but so far no one I know has stumbled across it.

Indeed, it's the kind of thing where direct feedback from the developers is
really needed.
You can programatically update the queries as needed using VBA in Excel
and also control Excel via VBA in Word. So once you have created the
queries you can refresh the results as needed.

Yes, I posted some code for this that seems to work, but if you happen to
have code that lets you modify the connection string/query string of an
existing Excel QueryTable using automation from Word, please let me know.
Every time I tried this, Word crashed. However, I can't say I've exhausted
all the possibilities in this area.

The other thing I noticed was that the documentation in Office 2004 suggests
that it should be possible to use query files (cf. .qry/.dqy files on
Windows), even though MS Query cannot currently do so, using FINDER; as the
file type in the necessary connection string. So I tried one I'd created on
Windows but no luck.

Peter Jamieson
 
C

consiglieri

Hi all

I've been looking into using perl and the win32::eek:le module. From my
tests so far this seems to be a way to achieve mysql connectivity. Let
the perl script connect to the mysql server, gather the info you want
in the word documents, then open the word document with win32::eek:le with
the necessary info inputed. I haven't had 100% success, but so far I
can initiate a word or excel document, input info. Ofcourse using perl
and applescript should be a doable. Since I know more perl then
applescript I havent tried applescript yet.

I will certainly let the mac business unit know what I think word
should be able to do with resepct to mysql connectivity.

Thomas

PS/ Should i continue to post efforts to try an connect even if they
include som perl or applescript specifics?
 
J

JE McGimpsey

consiglieri said:
Ofcourse using perl
and applescript should be a doable. Since I know more perl then
applescript I havent tried applescript yet.

One could do this from within VBA:

Selection.TypeText MacScript("do shell script ""perl ~/hello.cgi""")
 
C

consiglieri

Aha..didnt know VBA could execute perl scripts.Thats good news I think.

Can you recommend a good tutorial for VBA on the net ...where they have
some kind of example that helps you get going?
 
P

Paul Berkowitz

Aha..didnt know VBA could execute perl scripts.Thats good news I think.

What the VBA is doing there is a 'MacScript' command, which is an
AppleScript as a literal string. The AppleScript in turn is calling 'do
shell script', a command which can run any Unix shell script (also as a
string). The quoting can get a bit hairy. Quotes within quotes in VBA are
doubled. POSIX File paths within 'do shell script' AppleScript should use
the

quoted form of POSIX path of [colon-file-path]

if it's got any spaces in the file path, anywhere. or it gets too hot to
handle.
Can you recommend a good tutorial for VBA on the net ...where they have
some kind of example that helps you get going?

You won't find any AppleScript/MacScript guidance anywhere, mind you. You
need to know some AppleScript and then the VBA Help's simple description of
MacScript is all there is.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

Jim Gordon MVP

Hi Peter,

After experimenting a bit more I discovered that the DATABASE field code
does actually work on Mac Office. I tried it in Office 2001 and Office
2004.

The following field code when refreshed will return the requested data:
{ DATABASE \d "MyDrive:MySource.xls \s "SELECT MyColumn from Sheet1" }

This means that two of our major questions have been answered. The
DATABASE field code works and SQL in Word works!

It seems the only remaining piece of the puzzle to solve is what the
syntax is for the \c field switch. I tried several likely things, but
was unable to find a syntax that works.

Someone at Microsoft is going to see if they can get us a sample or a
determination for sure about the \c field switch.

-Jim
 
P

Peter Jamieson

Hi Jim,
Someone at Microsoft is going to see if they can get us a sample or a
determination for sure about the \c field switch.

Good.

Even in Word 2003 where ODBC connections are definitely feasible, the basic
problem is that you have to supply a data file (\d) parameter in the {
DATABASE } field, specifying a file in the Windows file system, otherwise
you get the Select Data Source dialog.

Since server-type databases such as MySQL generally want you to connect to a
"server" rather than a "file", it's not obvious what you specify in the \d
parameter to make it all work.

On the Windows version, in the similar OpenDataSource method you can get
around this by specifying the data file as "", but to make that work in
recent versions of Word you have to add a special Subtype parameter that
makes it work like Word 2000. In the DATABASE field, \d "" just doesn't
work.

Again on the Windows version, it's possible to work around this by using the
name of an ODBC file DSN in the \d parameter, and specifying \c
"FILEDSN=<the_file_DSN_pathname>" I do not know whether the equivalent would
work on Mac because
a. the ODBC administrator I'm using (iODBC) doesn't have a facility to
create a file DSN. Perhaps there is other ODBC administrator software that
can do it.
b. in Windows you can create one using the ODBC administrator or by hand in
Notepad. It's pretty clear what needs to go in the .dsn. On Mac, I tried
this but could not tell whether it did not work because...
- file DSNs are not supported (and perhaps even unheard of)
- I put the wrong information in
- of some additional Mac constraint, e.g. the file has to have a certain
type.

Peter Jamieson
 
C

consiglieri

Hi

On Windows Word97 I can query and get results frpm mysql by using the
DSN name for my connection \c DSN=connectionname and then issuing a
query \s my query.

The only problem is returning more than one field its inserted into a
tabel and I have not been able to set a format for that table so it
spreads out on the whole page which is not what I want.

On office 2004 I can do the same by using \d and putting in the path
for my xls file .. allthough it took me a while to figure out the
format for the path.

The query on mac must contain the path

i.e \s "SELECT something FROM Macintosh HD:Users:folder:file.xls"

This also results in a table ... but how to set a format?
 
J

John McGhie [MVP - Word and Word Macintosh]

You can't set the table format before you created it. You have to go back
afterwards and format the table.

The following VBA code formats a table for you. This is very ³robust² code
that is in service at some of my customer sites, so it is built to be
unbreakable. You can simplify it a lot for what you want. For example, if
you ensure that your Normal template contains Table Heading and Table Body
styles, you can remove half the code :)

Sub Main()
'
' Insert or Format Table Macro
' Macro recorded 14/03/00 by John McGhie
'
' On Error GoTo Error

Dim astyle As Style
Dim aDoc As String
Dim aTemplate As String
Dim x As Integer
Dim TabBodyText As Style
Dim TabHeading As Style
Dim TabBullet As Style
Dim tabNumber As Style


aTemplate = ActiveDocument.AttachedTemplate.FullName
aDoc = ActiveDocument.FullName
For Each astyle In ActiveDocument.Styles
If UCase(astyle.NameLocal) = UCase("Table Body Text") Then Set
TabBodyText = astyle
If UCase(astyle.NameLocal) = UCase("Table Bullet") Then Set TabBullet =
astyle
If UCase(astyle.NameLocal) = UCase("Table Heading") Then Set TabHeading
= astyle
If UCase(astyle.NameLocal) = UCase("Table Number") Then Set tabNumber =
astyle
Next astyle

If TabBodyText Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Body Text"
Set TabBodyText = ActiveDocument.Styles("Table Body Text")
With TabBodyText
.AutomaticallyUpdate = False
.BaseStyle = "Body Text"
.NextParagraphStyle = "Table Body Text"
End With
With TabBodyText.Font
.Name = Arial
.Size = 10
.Bold = False
.Italic = False
End With
With TabBodyText.ParagraphFormat
.LeftIndent = 0
.RightIndent = 0
.SpaceBefore = 2
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = False
.KeepTogether = True
.PageBreakBefore = False
.FirstLineIndent = 0
.OutlineLevel = wdOutlineLevelBodyText
End With
End If

If TabHeading Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Heading"
Set TabHeading = ActiveDocument.Styles("Table Heading")
With TabHeading
.AutomaticallyUpdate = False
.BaseStyle = "Table Body Text"
.NextParagraphStyle = "Table Heading"
End With
With TabHeading.Font
.Name = Arial
.Size = 10
.Bold = True
.Italic = False
End With
With TabHeading.ParagraphFormat
.LeftIndent = 0
.RightIndent = 0
.SpaceBefore = 2
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = True
.KeepTogether = True
.PageBreakBefore = False
.FirstLineIndent = 0
.OutlineLevel = wdOutlineLevelBodyText
End With
End If

If TabBullet Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Bullet"
Set TabBullet = ActiveDocument.Styles("Table Bullet")
With TabBullet
.AutomaticallyUpdate = False
.BaseStyle = "Table Body Text"
.NextParagraphStyle = "Table Bullet"
End With
With TabBullet.Font
.Name = Arial
.Size = 10
.Bold = False
.Italic = False
End With
With TabBullet.ParagraphFormat
.LeftIndent = 22
.RightIndent = 0
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 5
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.FirstLineIndent = -17
.OutlineLevel = wdOutlineLevelBodyText
End With
TabBullet.ParagraphFormat.TabStops.ClearAll
TabBullet.ParagraphFormat.TabStops.Add _
Position:=22, Alignment:=wdAlignTabLeft, Leader:= _
wdTabLeaderSpaces
With ListGalleries(wdBulletGallery).ListTemplates(7).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = 6
.Alignment = wdListLevelAlignLeft
.TextPosition = 22
.TabPosition = 22
.ResetOnHigher = 0
.StartAt = 1
.Font.Name = "Symbol"
.LinkedStyle = "Table Bullet"
End With
End If

If tabNumber Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Number"
Set tabNumber = ActiveDocument.Styles("Table Number")

With tabNumber
.AutomaticallyUpdate = False
.BaseStyle = "Table Bullet"
.NextParagraphStyle = "Table Number"
End With
With tabNumber.Font
.Name = Arial
.Size = 10
.Bold = False
.Italic = False
End With
With tabNumber.ParagraphFormat
.LeftIndent = 22
.RightIndent = 0
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.FirstLineIndent = -17
.OutlineLevel = wdOutlineLevelBodyText
End With
tabNumber.ParagraphFormat.TabStops.ClearAll
tabNumber.ParagraphFormat.TabStops.Add _
Position:=22, Alignment:=wdAlignTabLeft, Leader:= _
wdTabLeaderSpaces
With ListGalleries(wdNumberGallery).ListTemplates(7).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = 6
.Alignment = wdListLevelAlignLeft
.TextPosition = 22
.TabPosition = 22
.ResetOnHigher = 0
.StartAt = 1
.LinkedStyle = "Table Number"
End With
End If

If Not Selection.Information(wdWithInTable) Then
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=5,
NumColumns:= _
3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
End If

Dim aTable As Table
Set aTable = Selection.Tables(1)

aTable.Select
aTable.AutoFormat Format:=wdTableFormatGrid5, ApplyBorders:= _
True, ApplyShading:=True, ApplyFont:=False, ApplyColor:=False, _
ApplyHeadingRows:=True, ApplyLastRow:=False,
ApplyFirstColumn:=False, _
ApplyLastColumn:=False, AutoFit:=True

aTable.Select

With Selection
.Rows.AllowBreakAcrossPages = False
.Paragraphs.Reset
.Font.Reset
.Style = ActiveDocument.Styles("Table Body Text")
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth025pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth025pt
.Color = wdColorAutomatic
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth025pt
.DefaultBorderColor = wdColorAutomatic
End With

aTable.Rows(1).Select
With Selection
.Style = ActiveDocument.Styles("Table Heading")
.Rows(1).HeadingFormat = True
With .Shading
.Texture = wdTexture10Percent
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
End With

aTable.AutoFitBehavior (wdAutoFitWindow)

End

Error:
MsgBox "The Template has been damaged. See Tech Support.", vbCritical

End Sub



Hi

On Windows Word97 I can query and get results frpm mysql by using the
DSN name for my connection \c DSN=connectionname and then issuing a
query \s my query.

The only problem is returning more than one field its inserted into a
tabel and I have not been able to set a format for that table so it
spreads out on the whole page which is not what I want.

On office 2004 I can do the same by using \d and putting in the path
for my xls file .. allthough it took me a while to figure out the
format for the path.

The query on mac must contain the path

i.e \s "SELECT something FROM Macintosh HD:Users:folder:file.xls"

This also results in a table ... but how to set a format?

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
C

consiglieri

John

Could I possibly trouble you to send a file with that script to
(e-mail address removed)?

I tried copying it but I have compilation errors and I thought perhaps
they where a result of some formatting issues when doing copy and
paste? Or perhaps you allready know thats not the issue..if so please
let me know.

Once again, many thanks
 
C

consiglieri

Hi

I keep getting DefaultTableBehavior:=wdWord9TableBehavior

The named argument does not exist

Any chance you could explain that to me? I am a complete newbie to this
VBA stuff
 
J

Jeffrey Weston [MSFT]

Hey, hey

Unfortunately the \c ODBC DATABASE field switch is not supported in Word
2004. It is kept in the application for backwards and cross platform
compatibility purposes, so Word:mac can open already existing documents that
have this switch. Excel 2004, of course supports ODBC connections but Word
2004 does not.

However, I have forwarded this thread on to the others in MacBU for future
consideration.

--
Jeffrey Weston
Mac Word Test
Macintosh Business Unit
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

John McGhie [MVP - Word and Word Macintosh]

Oh, sorry about that :)

That's code from the PC version of the macro. Remove the whole
property/value pair "DefaultTableBehavior:=wdWord9TableBehavior"

Just delete it, and Word will revert to its default (auto-size columns)
instead of the previous fixed-size columns. Hopefully it won't make a
difference for your application.

Cheers


Hi

I keep getting DefaultTableBehavior:=wdWord9TableBehavior

The named argument does not exist

Any chance you could explain that to me? I am a complete newbie to this
VBA stuff

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
P

Peter Jamieson

I guess if you had posted your answer to all the groups in this thread I'd
have seen it.

Here are a few questions for you:
Unfortunately the \c ODBC DATABASE field switch is not supported in Word
2004. It is kept in the application for backwards and cross platform
compatibility purposes, so Word:mac can open already existing documents
that have this switch.

Can you confirm that this means "documents that have this switch and where
Wordmac can do the right thing even if we ignore the \c switch" ?
Excel 2004, of course supports ODBC connections

Why "of course" for Excel and, err.. nothing for Word? What's the big deal?
The technological problem is surely identica?

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top