Opening files in a public folder

Ed Mah

New Member
Joined
Dec 13, 2003
Messages
26
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.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,564
Messages
6,179,543
Members
452,924
Latest member
JackiG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top