Writing a Word 2003 document from Access 2007

B

Brian

I wrote a simple program in Access 2007 VBA that creates a Word document,
takes data from the form and inserts it into the Word document. In order to
do this, I open Word using the following:

Dim AppWord As New Word.Application
AppWord.Documents.Add "c:\templates\wordtemplates\fax.dot"
AppWord.ActiveDocument.ShowSpellingErrors = True
AppWord.Visible = True
AppWord.ActiveDocument.Bookmarks("ContactName").Range.Text =
StrConv(rst![str_FirstName] & " " & rst![str_LastName], vbProperCase)
AppWord.ActiveDocument.Bookmarks("CompanyName").Range.Text =
StrConv(rst![str_CompanyName], vbProperCase)

....and so on...

Problem is that my users absolutely "dislike" the new Word 2007 and have
been griping since I installed it. Does anyone know (in order of
preference)...

1) if I can make Word 2007 look like Word 2003?
1) if I can use Access 2007 with Word 2003?
2) if I can use Access 2007 to create an OpenOffice document?

Thanks to anyone that can offer any input!
 
D

Douglas J. Steele

1. If you mean you want menus rather than the ribbon, Microsoft doesn't
offer that feature. However, there are 3rd parties out there who do. A quick
search in Google revealed
http://office.microsoft.com/en-us/marketplace/EM102220621033.aspx?CategoryID=CE011347481033
http://www.addintools.com/english/menuword/ and others.

2. There should be no issue using Word 2003 from Access 2007. You might want
to switch to Late Binding though, since it sounds as though you don't have
Word 2003 installed on your machine anywhere. For the code you showed, try

Dim AppWord As Object

Set AppWord = CreateObject("Word.Application.11")
AppWord.Documents.Add "c:\templates\wordtemplates\fax.dot"
AppWord.ActiveDocument.ShowSpellingErrors = True
AppWord.Visible = True
AppWord.ActiveDocument.Bookmarks("ContactName").Range.Text = _
StrConv(rst![str_FirstName] & " " & rst![str_LastName], vbProperCase)
AppWord.ActiveDocument.Bookmarks("CompanyName").Range.Text = _
StrConv(rst![str_CompanyName], vbProperCase)

3. Couldn't tell you. If OpenOffice supports automation, then there's no
reason why you couldn't. I've used Access with WordPerfect in the past.
 

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

Top