PC Review


Reply
Thread Tools Rate Thread

Crash in Office 2000 - works in 2003

 
 
IUnderstandSomething
Guest
Posts: n/a
 
      4th Jul 2007
I have made a code that works fine with me running Office 2003, but
crash in the customers setup running Office 2000 and only RunTime
Access 2000. What do I need to change?

The code is run from a form module in Access trying to connect to a
Word-document:

**************************************************************
Private Sub Journal_DblClick(Cancel As Integer)
With Me!Journal

.Enabled = True
.Locked = False
.Class = "Word.Application"
.Verb = acOLEVerbOpen
.Action = acOLEActivate
End With
InsertField

Feil:

End Sub

Private Sub btnNewJournal_Click()
'On Error GoTo wordfeil

Me!Journal.SetFocus

With Me!Journal
.Enabled = True
.Locked = False
If .OLEType <> acOLENone Then
MsgBox "There is already a journal."
GoTo slutt
End If

.Class = "Word.Application"
'.OLETypeAllowed = acOLEEmbedded
'.SourceDoc = vPath & "\NyJournal.doc"
.Verb = acOLEVerbOpen
.Action = acOLECreateEmbed
.Action = acOLEActivate
End With
InsertField

slutt:
Exit Sub

wordfeil:
MsgBox Err.Number & vbCr & Err.Description
Exit Sub
End Sub

Public Function InsertBookmark(vBook, vTekst As String)
On Error GoTo Err_InsertBookmark
With Me!Journal
.Object.Application.Selection.GoTo what:=wdGoToBookmark,
Name:=vBook
.Object.Application.Selection.TypeText Text:=vTekst
End With
Exit Function
Err_InsertBookmark:
If Err = 5101 Then 'No bookmark
MsgBox "No bookmark"

Else
MsgBox Err.Description
End If
Exit Function
End Function

Private Sub InsertField()
Dim x
On Error GoTo feilfelt
x = InsertBookmark("Kategori", "JOURNAL" & vbCrLf &
UCase(Kategori))
x = InsertBookmark("Navn", Nz(Fornavn & " " & Etternavn, ""))
x = InsertBookmark("Adresse", Nz(Adresse, ""))
x = InsertBookmark("Født", Nz(Fødselsdato, ""))
x = InsertBookmark("Postnr", Nz(Postnummer, ""))
x = InsertBookmark("Poststed", Nz(Poststed, ""))
x = InsertBookmark("Sivilstand", Nz(Sivilstand, ""))
x = InsertBookmark("Pårørende", Nz(Pårørende, ""))
x = InsertBookmark("TlfPriv", Nz(TelefonPriv, ""))
x = InsertBookmark("TlfJobb", Nz(TelefonJobb, ""))
x = InsertBookmark("TlfMob", Nz(TelefonMobil, ""))
x = InsertBookmark("FastLege", Nz(LegeFast, ""))
x = InsertBookmark("TlfLege", Nz(TelefonLege, ""))
x = InsertBookmark("Anmerkninger", "Spesielle anmerkninger: " &
Anmerkninger & vbCrLf & vbCrLf)
x = InsertBookmark("Start", "")
Me!Journal.Object.Application.ActiveWindow.ActivePane.LargeScroll
Down:=-2
feilfelt:
Exit Sub
End Sub
********************************************************************

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do I need Works 2000, + Works 2002 Setup Launcher, + Works 6.0 ? =?Utf-8?B?dG90bw==?= Windows XP New Users 1 8th Jul 2005 08:19 PM
Picture Video - crash,crash,crash =?Utf-8?B?TUNH?= Windows XP MovieMaker 3 23rd Sep 2004 05:39 PM
Expl. 6.0 crash, crash, crash Dave King Windows XP Internet Explorer 1 5th Jul 2004 04:40 AM
Crash, crash, crash Gregg Fowler Windows XP Internet Explorer 1 14th Oct 2003 01:57 PM
Crash Crash Crash Scott Windows XP Games 2 24th Sep 2003 01:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:26 PM.