![]() |
|
#1
|
|||
|
|||
|
Hi Folks
I've been asked to debug some VBA code from a macro in a Word document that no longer works now we've moved to Office 2010. I'm told I need to convert the code to ADO. I'm unsure what this means and I'm a little bit out of my depth. Can anyone help me with this please? Here's the code: Code:
Sub DutyOfCare2()
Dim Db As Database
Dim WkSpace As Workspace
Documents.Add Template:="cwtn.dot"
ActiveDocument.PageSetup.HeaderDistance = 0
On Error Resume Next
Application.StatusBar = "Opening Database"
Set WkSpace = CreateWorkspace("Contender", "", "", dbUseODBC)
Set Db = WkSpace.OpenDatabase("Contender", dbDriverComplete, False, "ODBC;DATABASE=/usr/username/v7/databases/live/username;...;...;DSN=Contender")
If BuildDutyOfCareReps(Db) Then
Dialogs(wdDialogFilePrint).Show
End If
Db.Close
Application.StatusBar = "Ready"
ActiveDocument.Saved = True
End Sub
Remster Last edited by Remster; 02-14-2015 at 01:31 AM. Reason: UserID & Password in code changed |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting Q and A to database | jscgdunn | Word | 1 | 04-11-2014 05:29 PM |
converting mm.s format to mm:ss
|
derohanes | Excel | 12 | 10-30-2012 08:34 AM |
| Converting hh:mm to hours | Sammael | Excel | 2 | 04-17-2012 01:33 PM |
| Error converting to PDF | danx1000 | Word | 1 | 04-03-2012 04:58 PM |
| Converting ACT to Outlook | tabletop | Office | 1 | 01-26-2012 09:39 PM |