Issue:
Current process uses MS Access, MS Word and the Windows clipboard to create correspondence. Because of the way that the clipboard is used I can only have one of these processes running on a machine at any given time. If I try to run more than one, I run the risk of incorrect data being pasted to the wrong Word document.
Goal:
I'd like to find some kind of clipboard manager with an object model I can use from Access VBA. This should allow me to run multiple processes without getting incorrect content from a shared clipboard. This is an automated process, so anything that would require user interaction is out.
[ul]
[li]Instantiate a public clipboard object from within Access[/li]
[li]Copy to a specified clipboard[/li]
[li]Paste from a specified clipboard[/li]
[li]Have the option to retain any formatting[/li]
[/ul]
Ideally, I'd like to be able to create a clipboard object and get an index returned when I copy to it. I would then be able to retrieve that item for pasting by providing the index (rough example below). I know that the Office clipboard allows for multiple items but there is no interface with it (aside from accessing it through the command bars) that would allow me to know the index of what was being copied making it impossible to use.
'-------------------------------------------------------------------
Dim cb as ClipBoard
Dim id as integer
'creates the new clipboard object
set cb = New ClipBoard("ClipboardA")
'copies the selection and returns the index on the clipboard
id = cb.Copy(oWord.ActiveDocument.Selection)
Blah, do some stuff
Blah, do some stuff
Blah, do some stuff
cb.Paste(oWord.ActiveDocument, id)
'-------------------------------------------------------------------
If you know of anything or have done anything similar, please add a response. Any help or direction on this would be greatly appreciated.
Thank you
Current process uses MS Access, MS Word and the Windows clipboard to create correspondence. Because of the way that the clipboard is used I can only have one of these processes running on a machine at any given time. If I try to run more than one, I run the risk of incorrect data being pasted to the wrong Word document.
Goal:
I'd like to find some kind of clipboard manager with an object model I can use from Access VBA. This should allow me to run multiple processes without getting incorrect content from a shared clipboard. This is an automated process, so anything that would require user interaction is out.
[ul]
[li]Instantiate a public clipboard object from within Access[/li]
[li]Copy to a specified clipboard[/li]
[li]Paste from a specified clipboard[/li]
[li]Have the option to retain any formatting[/li]
[/ul]
Ideally, I'd like to be able to create a clipboard object and get an index returned when I copy to it. I would then be able to retrieve that item for pasting by providing the index (rough example below). I know that the Office clipboard allows for multiple items but there is no interface with it (aside from accessing it through the command bars) that would allow me to know the index of what was being copied making it impossible to use.
'-------------------------------------------------------------------
Dim cb as ClipBoard
Dim id as integer
'creates the new clipboard object
set cb = New ClipBoard("ClipboardA")
'copies the selection and returns the index on the clipboard
id = cb.Copy(oWord.ActiveDocument.Selection)
Blah, do some stuff
Blah, do some stuff
Blah, do some stuff
cb.Paste(oWord.ActiveDocument, id)
'-------------------------------------------------------------------
If you know of anything or have done anything similar, please add a response. Any help or direction on this would be greatly appreciated.
Thank you