Sub or Function not defined

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ronny Sigo

    #1

    Sub or Function not defined

    Hello all,
    I have an Access form, wherein the user can put in some data. These data
    will be used in a Word document. All goes well except for the line indent
    .... I get the error message "Sub or Function not defined"
    Here is the code

    Dim appWD As Object
    Set appWD = CreateObject("W ord.Application ")
    appWD.Visible = True
    appWD.Documents .Add
    With appWD
    Set myDoc = .Documents.Add

    ' this is the problem line
    ActiveDocument. Paragraphs(1).L eftIndent =
    CentimetersToPo ints(20)
    ' I also tried :
    ActiveDocument. Paragraphs(1).L eftIndent = InchesToPoints( 20)
    'but that doesn't work either ....

    Any help would be very much appreciated ....
    Thanks !
    Ronny Sigo




Working...