Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Format Copied UNC Path for Outlook (Requires Selected File to UNC Path script)

Description
You'll need to also download the "Selected File to UNC Path" script for this script to work. This will run that function, then take the path generated from that and put it on the clipboard in a format that works in Outlook.
Language
C#.net
Minimum Version
Created By
Manuel R.
Contributors
-
Date Created
Apr 16, 2020
Date Last Modified
Apr 16, 2020

Scripted Function (Macro) Code

using System;
using System.Drawing;
using System.IO;

public static class DisplayFusionFunction
{
       
	public static void Run(IntPtr windowHandle)
	{
        // wait for save_UNC_path_and_selection to change flag FLAG_UNCPATH_UPDATED then retrieve the calculated UNCPATH variable
        bool ok = BFS.ScriptSettings.WriteValueBool("FLAG_UNCPATH_UPDATED", false);
	    ok = BFS.DisplayFusion.RunFunction("get_UNC_path_and_selected_file");	    
	    while (! BFS.ScriptSettings.ReadValueBool("FLAG_UNCPATH_UPDATED"))
	    {
            BFS.General.ThreadWait(20);
	    }	    
        string uncPath = BFS.ScriptSettings.ReadValue("UNCPATH");
        // Outlook 2010 : To preserve the spaces in your link text, use an opening and closing chevron
        uncPath = "<" + uncPath + ">";
        BFS.Dialog.ShowTrayMessage("Copied to clipboard : " + uncPath);
        BFS.Clipboard.SetText(uncPath);
	}
}