Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to programmatically create a file link in the clipbo
Message
From
03/10/2006 17:13:45
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01159071
Message ID:
01159135
Views:
27
In this case, automation is not wanted by the users, since they are so used to outlook. They only want to ease the work of attaching the file(s).

>Sorry, I misunderstood the initial message. I don't know how to create an attachment link in the clipboard using API. However, you could use Outlook automation to create the message and include the attachment directly from your VFP app. Maybe something like:
>
>olApp = CREATEOBJECT("Outlook.Application")
>olNameSpace = olApp.GetNamespace("MAPI")
>olNameSpace.Logon
>*
>olItem = olApp.CreateItem(0) && or a referrence to the current message being edited in Outlook (??).
>olItem.Attachments.Add(pathToFile)
>
>Actually, this may be a better option for the user who's sending a message in that specific context.
>
>HTH
>
>
>>I don't want to create that kind of a link, I want to attach the actual file so that it is sent with the email message. If you for instance locate a PDF in explorer, mark it and press ctrl-c, you have created a link to this file in the clipboard. Then when you switch to Outlook, find a message and press reply, you can press ctrl-v and this file is added to the message as an attachement. I want the same type of link added to the clipboard, but I want to do it programmatically. I hope I described it better this time.
>>
>>>Hi Tore,
>>>
>>>When I execute _CLIPTEXT = "file:///C:\WINDOWS\System32\calc.exe" in VFP, then switch to Outlook message and press Ctrl-V, I get the link pasted into the message.
>>>
>>>>No, sorry. I don't need the name of the file, nor do I need the contents of the file, I need to store a link to the file into the clipboard. I am pretty sure that I must use an API function, but I don't know which.
>>>>
>>>>>Would this work?
>>>>>_CLIPTEXT = PathToFile
>>>>>
>>>>>>In an application we need to copy a link to a file into the clipboard, so that we can paste this link into Outlook and create an attachemnt. If this description of my need is unclear, I will describe the scenario.
>>>>>>
>>>>>>My user receives an email asking for more information about a given product. He wants to reply by making some small comments, and attaching a file, for instance a PDF or a DOC. Information about which file he shall attach, is in a memo field. So I want to add a button to his form which creates a link to this specific file, so that when he writes the reply in Outlook, he can simply press ctrl-v, and the file is attached.
>>>>>>
>>>>>>Any suggestions?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform