1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

sequential numbering on Word 2010 Doc

Discussion in 'Business Applications' started by ruce2, Aug 19, 2013.

Thread Status:
Not open for further replies.
  1. ruce2

    ruce2 Thread Starter

    Joined:
    Aug 19, 2013
    Messages:
    1
    I have a form that needs to have a three digit number (identifier) generated and visible on the form each time the document is opened (new number, next in sequence) and saved. I am trying to use a Macro but I keep getting an error that says "Autonew() ambiguous identifier" or something like that. I am not a programmer so I need very specific and easy steps to follow to accomplish this. The sooner the better, as I have been trying to get this done for 2 weeks now and I'm not having any luck.
    thanks!
    This is the macro code, and the error is "Compile Error: Ambiguous name detected: Autonew()"
    Sub AutoNew()
    '
    ' Autonew Macro
    '
    '
    Sub AutoNew()
    Order = System.PrivateProfileString("C:\Settings.Txt", _
    "MacroSettings", "Order")
    If Order = "" Then
    Order = 1
    Else
    Order = Order + 1
    End If
    ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")
    ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")
    End Sub
    End Sub
     
  2. XCubed

    XCubed

    Joined:
    Feb 21, 2013
    Messages:
    520
    Hi

    This usually means that you have 2 macros with the same name. Check in all modules including Normal modules for the other Autonew() macro.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - sequential numbering Word
  1. Jack1000
    Replies:
    4
    Views:
    285
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1106353

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice