How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename 
Author Message
 How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename

Hello,

Does someone know and if it is possible to  safe your clipboard into a file
using Visual Basic.

Thanks



Sun, 24 Mar 2002 03:00:00 GMT  
 How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename
use clipboard.getdata see help-file for futher info
Quote:

> Hello,

> Does someone know and if it is possible to  safe your clipboard into a file
> using Visual Basic.

> Thanks



Sun, 24 Mar 2002 03:00:00 GMT  
 How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename
'Requires Project/References entry for
'   Microsoft Scripting runtime (scrrun.dll)
'
'Sample call:-
'  MsgBox SaveClipText(FName:=App.Path & "\ClipSave.txt")
'
Private Function SaveClipText(FName As String) As Boolean

    On Error GoTo SaveClipText_Exit

    Dim Result As Boolean ' default function result = False

    Result = Clipboard.GetFormat(vbCFText)
    If Result Then    ' text is available on clipboard
        With New Scripting.FileSystemObject
            With .CreateTextFile(FileName:=FName)
                .Write Clipboard.GetText
                .Close
            End With
        End With
    End If

SaveClipText_Exit:
    SaveClipText = Result

End Function
'
Barry Evans
Canberra, Australia
---

Hello,

Does someone know and if it is possible to  safe your clipboard into a file
using Visual Basic.

Thanks



Tue, 26 Mar 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename

2. How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename

3. How TO : Automatic copy (ctrl-c) + clipboard + paste (ctrl-v) + save as filename

4. RichTextBox <ctrl>V pastes 2 copies, <alt>EP pastes 1 copy

5. RichTextBox: Bad Cut,Paste interactions with Menu Shortcuts Ctrl+X, Ctrl+Y

6. Clipboard problem (Ctrl+C, Ctrl+V)

7. HOW CAN I DISABLE CTRL+X, CTRL+V,CTRL+C

8. HOW CAN I DISABLE Ctrl+C,Ctrl+V,Ctrl+X

9. Maskedit ctrl - read-only, but allow copy-paste?

10. Paste clipboard contents into filename during save- ?

11. How to disable CTRL+TAB and CTRL+SHIFT+TAB for switching mdi child windows

12. Trapping CTRL+BREAK and CTRL+ALT+DEL

 

 
Powered by phpBB® Forum Software