In Access 2003, I’m creating a directory in Windows.
In Outlook, I have a macro that will store messages into a folder using a function called BrowseForFolder
This works fine as a two step operation. First create the folder in Access then browse to that folder using the Outlook Macro to store the message. But it would be even better if I can use Access to create the folder and have the “previousPath” available to Outlook.
Is that possible to have a variable used in Access available to other applications like Outlook?
Code:
Dim strPath As String
strPath = Application.CurrentProject.Path & "\Reference\"
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
Shell "EXPLORER.EXE " & strPath, vbNormalFocus
In Outlook, I have a macro that will store messages into a folder using a function called BrowseForFolder
Code:
Dim previousPath As Variant
Dim strFolderpath As String
strFolderpath = BrowseForFolder(previousPath)
This works fine as a two step operation. First create the folder in Access then browse to that folder using the Outlook Macro to store the message. But it would be even better if I can use Access to create the folder and have the “previousPath” available to Outlook.
Is that possible to have a variable used in Access available to other applications like Outlook?