Link Table Manager Refresh Link to Outlook Linked Folder (Inbox) VBA (1 Viewer)

Mohsin Malik

Registered User.
Local time
Today, 06:17
Joined
Mar 25, 2012
Messages
175
Hello everyone,

I have created a link table to 'Outlook' Inbox folder and I am interested to refresh 'Link table' to 'Outlook' folder 'Inbox' through VBA. This will be helpful to automatically refresh link to the Outlook Inbox folder when I will be using some different machine/computer.

I can see the 'MsysObjects' table that is pointing to something like this 'Outlook 9.0;MAPILEVEL=john.doe@email.com|;PROFILE=Outlook;TABLETYPE=0;TABLENAME=Inbox;COLSETVERSION=12.0;

Any idea that how to refresh link to outlook linked table through VBA?

Thanks
Mohsin
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:17
Joined
Feb 19, 2013
Messages
16,610
try

currentdb.tabledefs("mytable").refreshlinks
 

Mohsin Malik

Registered User.
Local time
Today, 06:17
Joined
Mar 25, 2012
Messages
175
try

currentdb.tabledefs("mytable").refreshlinks

Thanks CJ for the idea, can you please share some lines of code or any helpful link that will only to refresh one refresh link 'Inbox' table to 'Outlook' default folder?

Or is there anyway to automatically drop/relink the Outlook 'Inbox' folder by DoCmd.TransferDatabase acLink outlook folder?
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 03:17
Joined
Feb 19, 2013
Messages
16,610
you will have one table per folder so

currentdb.tabledefs("folder1").refreshlinks
currentdb.tabledefs("folder2").refreshlinks
currentdb.tabledefs("folder3").refreshlinks
 

Mohsin Malik

Registered User.
Local time
Today, 06:17
Joined
Mar 25, 2012
Messages
175
you will have one table per folder so

currentdb.tabledefs("folder1").refreshlinks
currentdb.tabledefs("folder2").refreshlinks
currentdb.tabledefs("folder3").refreshlinks


Hi CJ,

Thanks for the prompt response, Is this still work if I use this copy of database on a different machine (as the outlook folder location/machine name) on the other machine changed and inbox folder link broken. I am getting the following error 'Mapi Folder or Address Book not found' and I want to programatically refresh link to 'Outlook' default folder, so whenever I am on any PC it automatically refresh link to the default Outlook Inbox folder. Does that make sense?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:17
Joined
Feb 19, 2013
Messages
16,610
OK - so you don't mean refresh, you mean to automatically find an outlook file when its location is different?

So far as I know there is no default location for outlook files and from the connection data provided, the only thing that is likely to change is the email address. If that is the same, it may be the refresh will work on it's own

Suggest you google 'access relink to outlook' and see what you can find, I don't have any suggestions
 

Mohsin Malik

Registered User.
Local time
Today, 06:17
Joined
Mar 25, 2012
Messages
175
OK - so you don't mean refresh, you mean to automatically find an outlook file when its location is different?

So far as I know there is no default location for outlook files and from the connection data provided, the only thing that is likely to change is the email address. If that is the same, it may be the refresh will work on it's own

Suggest you google 'access relink to outlook' and see what you can find, I don't have any suggestions

Thanks CJ for your help, Yes to automatically find an outlook file and refresh the link. I am able to get that working properly.
 

Users who are viewing this thread

Top Bottom