Results 1 to 7 of 7

Thread: code running on xp not on 2000

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    151

    code running on xp not on 2000

    I have written vba program to send fax from outlook.
    Its working fine on xp(outlook 2003).
    BUt on windows 2000 prof(outlook 2000)., it gives runtime error on this line -:
    .send --Outlook does not recognize one or more names.
    Last edited by v_gyku; Oct 3rd, 2005 at 06:15 AM.

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: code running on xp not on 2000

    post more code...

    names? could it be who your sending it to? if you copy the name directly into Otl2000.. does it error when you do it manually?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: code running on xp not on 2000

    Quote Originally Posted by v_gyku
    I have written vba program to send fax from outlook.
    Its working fine on xp(outlook 2003).
    BUt on windows 2000 prof(outlook 2000)., it gives runtime error on this line -:
    .send --Outlook does not recognize one or more names.
    If you send it to yourself does it work?

  4. #4
    Fanatic Member dannymking's Avatar
    Join Date
    Jul 2005
    Location
    Darlington, North East UK
    Posts
    677

    Re: code running on xp not on 2000

    When you send the email.. if there are any spaces in any name, outlook will try to determine the address of the person, as it is presuming that this name exists in an address book.

    If it is not in the address book then it will be unable to recognise the name, if you use outlook itself to try and send to an address which you know is wrong then a "Check Names" dialog is displayed to prompt you that the name was not found, and offers up some recommendations.

    Doing this through VBA results in a run-time error of

    -142852667: Outlook does not recognise one or more names.
    Danny

    Never Think Impossible

    If you find my answer helpful then please add to my reputation

  5. #5
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: code running on xp not on 2000

    I believe you can do .ResolveNames (or something like that) and it will do a pretty good job of figuring it out
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Posts
    151

    Re: code running on xp not on 2000

    Getting the following error ----
    Run-time error'-2044706811 (86204005)':

    Code:
    Private Sub Command1_Click()
    TelNo = "223344" '*** You can use any intl format also
    'Create a mail item.
    Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
        With objOutlookMsg
            .To = "[Fax:" & TelNo & "]"
            .Subject = "Automated System Reports."
            .Body = "To Mr. XYZ" & Chr(10) & " This is an Automated Transmission from the computer." & Chr(10) & "Send Fax Completed." & Chr(10) & "------ End of Doc ------"
            .Importance = olImportanceHigh
            .Attachments.Add ("C:\windows\win.ini") 'Pathname+filename with ext
            .Send
        End With
    Set objOutlookMsg = Nothing
    
    End Sub
    If i put any tel.no while running in xp(office 2003) it works.
    It works means I dont know id fax goes or not, but it dosn't gives any error and tasks completes.Message comes in my sentmail items in outlook.

    But when running on office 2000, win 2000 prof, it gives above mentioned runtime error.

  7. #7
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: code running on xp not on 2000

    ahh.. faxing. you need to install "Microsoft At Work fax program"

    Outlook 2K doesnt have built in fax capabilities
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width