using Automator to paste selected text to a word document - text

I want to make an Automator shortcut to paste selected text to a Word document.
To provide Applescript with the selected text I used the following code:
on run {input, parameters}
set input to input as text
set the clipboard to the input as string
return input
end run
Then I "Get" and "Open" a specified Word document
And here, as I understand it, a new Applescript with the function "paste selected text to this word document" should be, but I have some real problems with this part of the Automator algorithm. Could anyone please help and/or give any tips?
Thanks!

Related

Can we extract coordinates of current selected text in pdf using VBA excel

Hi i am able to open a pdf document and select a specified text from the pdf document, but i want to know location of the selected text in the pdf document like page number and line number of that text.
Is there a function in vba excel which can help me get the location of the selected text in any form be it x,y coordinates or page and line number.
I think, you should use send keys option of vba for this. So whenever your file open then it's, also open pdf file. And once pdf file open then it will open find option by send keys code and serach, find, copy and paste according to your sendkeys code requirement.

Print to PDF (Not save as PDF) in Excel

I was wondering if there is a way to print to pdf. My company has a software installed as a printer (ScanSoft pdf). The reason I need to print as a pdf and not save is as follows:
My default printer can only print letter documents. I have few routines that format the excel document that I am working on to a tabloid document. And the since I my default printer can't support 11x17 (Tabloid). The page breaks are defaulted to letter document settings. And the tabloid is not an option in the size options. If I go and select the print and select a pdf and exit the print dialogue without saving - the page breaks are converted to the tabloid settings. I have another routine that runs through the document and adjusts the page breaks to avoid splitting merged cells.
What I am looking for at end of the day, run the routine to format document, run a routine to print as pdf then exit dialogue (to adjust page breaks), run routine to adjust page breaks, run routine to save pdf.
enter link description here
You just need to set your activeprinter to the pdf printer
Application.ActivePrinter ="what ever your printer is called"
To find out what it's called, set it as the activeprinter manually and then in the immediate window just type
? Application.ActivePrinter

Why do numeric hyperlinks make an entire cell clickable and the text uneditable?

I have notice that if you insert a hyperlink into any cell in Excel and set the text to display to be a number (1, for example), it causes the entire cell to now be clickable in addition to preventing you from changing the hyperlink text afterwards. If you try to change the hyperlink text by going to Edit Hyperlink the Text to Display is always Selection in Document.
If you do the exact same thing but make the Text to Display an alpha character (like a), it works just fine and you can edit the hyperlink Text to Display without issue.
This is causing problems because I am trying to read Excel data using Interop libraries and even those libraries are unable to read the Text to Display when it is set as a whole number with no decimal places.
If you create a Hyperlink like:
You can later edit the "Friendly Name" by selecting the cell and doing the edit in the Formula Bar.

Lotus #command script for Paste Special -> Text

I am looking for a way to create a button to paste plain text. i.e. Edit -> Paste Special -> Text.
I found the function #Command([EditPasteSpecial]) but it only pops up the Paste Special dialog box.
Is there a way to automatically select Text from this list? Some way to automate the keystrokes for "T" and "Enter" maybe?
I tried adding a line for #Char(84) and #Char(13) to simulate these keystrokes, but that didn't work. Any other options?
Thanks.
You have to use Lotusscript.
Look at the GetUnformattedText method of the NotesRichTextItem class.

Excel 2007 - Find a word

I have like 3000 works in an excel cell that I need to search one word in. It does not highlight the word, it only places me into the cell with the word.
Anybody has any idea how I can get the word highlighted that I am looking for?
Thank you,
Steve
You have to change the font/highlighting/background of the characters you find using the Characters property in VBA. This can be packaged with the actual search or you can perform the search manually and the highlighting with a macro. See this link for code samples http://www.ozgrid.com/forum/showthread.php?t=66197
Note that since you are actually changing font in Excel you will need to revert it to normal if you don't want the highlight saved with the document.
If you save the whole book as an HTML. Then open it in your preferred browser, you can search in the normal way and it should highlight the desired word.
You can use conditional formatting to highlight the entire cell that contains the search criteria, but I think you want only the specific text to be identified?
I haven't tried this, but here is a discussion on this:
http://www.mrexcel.com/forum/showthread.php?t=397445
If it's just one long cell, or if all the long cells are in a column, you could try using the "Text to Columns" feature (under the Data tab of the Ribbon). If you set it to be delimited by space (assuming your words are separated by spaces), this will make it so that each word occupies its own cell. Then when you use Find, it will highlight the exact cell.
Another option would be to copy the range you want to search and paste into MS Word. From there, you can search, and it will highlight the exact word.
export as a .csv then, then import so that it breaks each column on the space, then you can do what i said above, and then combine the cells. why don't you just copy paste the contents of the cell into notepad and do a seach & replace there?
There is no equivalent to the highlighting feature in Word in Excel.
What I would suggest is doing a Replace where you set the replace with to the word you are searching for, plus set the Format (using the Format... button on the Replace tab) to a yellow color (on the Fill tab of the Replace Format dialog). Once you have that, clicking on "Replace All" will get the effect that you are seeking (that is, all instances of the term "yellow" in the worksheet will now have a yellow fill color in the cell).
I hope this is what you were thinking of.
Mike
alt-e-f (find), type the word, then you can go thru the cells with em

Resources