Copying WF Classic source segm. to the clipboard w/o selecting it
Thread poster: Rossano Rossi

Rossano Rossi  Identity Verified
Local time: 01:15
English to Italian
+ ...
May 14

Is this possible?
e.g. by means of any WF variable accessible to VBA


 

Samuel Murray  Identity Verified
Netherlands
Local time: 01:15
Member (2006)
English to Afrikaans
+ ...
Probably, but.... May 14

Rossano Rossi wrote:
Is this possible?


Yeah, probably, but I don't know how. First, however, tell us: what is your segment protection level set to? I mean, if you press Ctrl+A while the cursor is inside the target field, does it select the entire file or only the entire target field? If the latter, then maybe you can record a simple macro that copies source to target, then selects all text and copies it, and then undo x 5, which should get you back your original target text.


 

DZiW
Ukraine
English to Russian
+ ...
Simply May 14

Perhaps, you may want to check PandoraBox for (1) MacroPreSegmentation=_macro_name or (2) Machine Translation--WFMT

Also see SendKeys ^C, playing with False/True optional waiting parameter.

Note, that using something like
If Application.NumLock = True Then ...
may re-use the same macro with different results, as appropriate.


 

Rossano Rossi  Identity Verified
Local time: 01:15
English to Italian
+ ...
TOPIC STARTER
VBA Code to copy WFClassic source segment to the clipboard May 15

This is a solution I have tested as working and implemented.

Sub CopyWfSourceTextToClipboard()
Dim txt As String
CopyText (ActiveDocument.Bookmarks("WfSource").Range.Text)
End Sub

Sub CopyText(Text As String)
'VBA Macro using late binding to copy text to clipboard.
'By Justin Kay, 8/15/2014
Dim MSForms_DataObject As Object
Set MSForms_DataObject = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
MSForms_DataObject.SetText Text
MSForms_DataObject.PutInClipboard
Set MSForms_DataObject = Nothing
End Sub

Thanks for your support.

[Edited at 2019-05-15 13:28 GMT]


 

DZiW
Ukraine
English to Russian
+ ...
Read the manual May 15

@Rossano, unlike wordfast.com or wordfast.net, the ProZ is but a translation-related forum.

As for copying the source segment, depending on your needs you may (1) check PandoraBox options, (2) simulate keyboard shortcuts (e.g. "^A" & "^C") or just (3) add a MT macro
Sub WFMT
Selection.Copy
End Sub


 

Rossano Rossi  Identity Verified
Local time: 01:15
English to Italian
+ ...
TOPIC STARTER
PB Setting May 15

I have set in the PB

MacroPreSegmentation=CopyWfSourceTextToClipboard

and after opening a segment in WF, I get the source text in the clipboard.

That is it.





[Edited at 2019-05-16 12:11 GMT]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Copying WF Classic source segm. to the clipboard w/o selecting it

Advanced search


Translation news related to Wordfast





SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running and helps experienced users make the most of the powerful features.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search