Hi.
I’m using Office 2003. I’m trying to open a file in a public folder. I don’t where the drive is stored (but I have an address).
I’ve tried 3 different methods.
1) using hyperlinks
Application.DisplayAlerts = False
Hyperlink = "Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls"
ActiveWorkbook.FollowHyperlink Hyperlink
It works, but it requires you to answer questions such as "Hyperlinks can be harmful to your computer ... Do you want to continue?" and "Would you like to open the file or save it to your computer?"
The second question can be overcome by unclicking the "Always ask before opening this type of file".
2) using the open
Workbooks.Open "Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls"
An error message Run time error 1004 - The file name or path does not exists
3) using the open and mapping the drive
Set myolapp = CreateObject("Outlook.Application")
Set mynamespace = myolapp.Application.GetNamespace("MAPI")
Set myfolder = mynamespace.Folders("Public Folders").Folders("All Public folders").Folders("Departmental Folders/Dossiers du Ministère").Folders("Finance & Administration Systems/Systèmes de finance et administration").Folders("G&C Data NCR/Données de S&C RCN")
Set myfolder1 = mynamespace.Folders("Public Folders").Folders("All Public folders")
Set myfolder2 = myfolder1.Folders("Departmental Folders/Dossiers du Ministère")
Set myfolder3 = myfolder2.Folders("Finance & Administration Systems/Systèmes de finance et administration")
Set myfolder4 = myfolder3.Folders("G&C Data NCR/Données de S&C RCN")
Workbooks.Open Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls
It doesn’t like myfolder4.
Any help would be greatly appreciated.
I’m using Office 2003. I’m trying to open a file in a public folder. I don’t where the drive is stored (but I have an address).
I’ve tried 3 different methods.
1) using hyperlinks
Application.DisplayAlerts = False
Hyperlink = "Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls"
ActiveWorkbook.FollowHyperlink Hyperlink
It works, but it requires you to answer questions such as "Hyperlinks can be harmful to your computer ... Do you want to continue?" and "Would you like to open the file or save it to your computer?"
The second question can be overcome by unclicking the "Always ask before opening this type of file".
2) using the open
Workbooks.Open "Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls"
An error message Run time error 1004 - The file name or path does not exists
3) using the open and mapping the drive
Set myolapp = CreateObject("Outlook.Application")
Set mynamespace = myolapp.Application.GetNamespace("MAPI")
Set myfolder = mynamespace.Folders("Public Folders").Folders("All Public folders").Folders("Departmental Folders/Dossiers du Ministère").Folders("Finance & Administration Systems/Systèmes de finance et administration").Folders("G&C Data NCR/Données de S&C RCN")
Set myfolder1 = mynamespace.Folders("Public Folders").Folders("All Public folders")
Set myfolder2 = myfolder1.Folders("Departmental Folders/Dossiers du Ministère")
Set myfolder3 = myfolder2.Folders("Finance & Administration Systems/Systèmes de finance et administration")
Set myfolder4 = myfolder3.Folders("G&C Data NCR/Données de S&C RCN")
Workbooks.Open Outlook:\\Public Folders\All Public Folders\Departmental Folders%2FDossiers du Ministère\ Finance & Administration Systems%2FSystèmes de finance et administration\ G&C Data NCR %2F Données de S&C RCN\~PYR.xls
It doesn’t like myfolder4.
Any help would be greatly appreciated.