Do Bookmarks have a limited length

Fiona H

Registered User.
Local time
Today, 03:31
Joined
Oct 25, 2006
Messages
28
I wonder if someone would be able to advise me on this. I sending fields from access to word, and placing them in the word doocument using bookmarks.

One of the fields is a long memo field, and only part of the field is arriving in the word document. Would someone be able to advise me if the bookmark feature has a limited length or whether there is something wrong with the programming I have done...

Do I need to format the field as something else, I know the date fields didn't work properly until I formated them as CDate.

Code:
Private Sub MergeButton_Click()
       
     'Start Microsoft Word 97.
    Set objWord = CreateObject("Word.Application")

    With objWord
        'Make the application visible.
        .Visible = True

        'Open the document.
        .Documents.Open ("\\Globalinfra.net\Teams\AW_LI_OMC\Private\Water\Regional Networks\Modellers\Database\Proforma for Modelling Results Template")
       
.ActiveDocument.Bookmarks("Details").Select
.Selection.Text = Format(Forms![Modelling Results by Modeller]![Modelling Request Text], "Details")

End With

MergeButton_Err:
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
End If
End Sub

There are a number of other bookmarks that do work correctly, but I have deleted those out and just left the one which is cutting down the text...

Thanks for looking!
 
I made it work by removing Format( at the beginning and ,"Details") at the end
 

Users who are viewing this thread

Back
Top Bottom