Modify Excel (2003) code for Network environment



I need to deliever an application to a network-type business client who
running MSO 2003 (all apps, including Outlook and Excel). The below code
works fine on my in-house Single user PC (Everything is on drive C:). The
below code is working great on my single user system. What are the issues I
can expect when I try and run this code "AS-IS" installed on his PC - where
his incoming mail is somehow on the mysterious "mail server", etc.. I'm at a
loss as to what to do if this code doesn't work once I copy the excel file to
his hard drive and run it. Can someone assist me? Thanks in advance...

Sub GetFromInbox()

Dim olApp As Outlook.Application
Dim olNs As Namespace
Dim Fldr As MAPIFolder
Dim olMail As Variant
Dim i As Integer
Dim C As Range
Dim TempName As String
Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr = olNs.Folders("Personal


For Each olMail In Fldr.Items
TempName = Mid(olMail.Subject, 13, WorksheetFunction.Find("(",
olMail.Subject) - 14)
With ActiveSheet.Range(Range("B5"), Range("B5").End(xlDown))
Set C = .Find(What:=TempName, LookAt:=xlWhole, _
LookIn:=xlValues, SearchOrder:=xlByColumns)
End With
With ActiveSheet
If Not C Is Nothing Then
C.Offset(0, 1).Value = olMail.ReceivedTime
End If
End With

Next olMail
Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing

End Sub


I'm late to the party, but did you try this code? What are you trying
to do with it?

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question