I am trying to compare two MS Word Docx's (.docx files) using Macro's but Mac OS is not supporting VB Script and Microsoft is not providing the support for MAC OS as well.
Hence I found that, If I want to execute Macro's then I need to write AppleScript. I am very new to AppleScript, could anyone please help on this.
1) In the script, i have to get two documents from some source location and want to compare both the doc's using MS Word compare functionality.
MS Word Doc1: "http://source/old.docx";
MS Word Doc2: "http://source/new.docx";
You can't use AppleScript in this instance, I suspect you're confusing the OS-level automation provided by AppleScript with the Office-specific automation provided by Microsoft macros.
If you wish to compare two .docx files for differences, you either need to make use of a Word document-aware "diff editor" or you need to make use of a code-based solution (perhaps using docx4j or similar). Here are a couple of links to get you started:
How to make TortoiseSVN diff .dot and .dotx Word template files
https://www.altova.com/diffdog/word-document-comparison.html
http://blog.martinfenner.org/2014/08/25/using-microsoft-word-with-git/
It is possible to do it.
Just open the Spotlight Search => write AppleScript Editor, open it and then File => Open Dictionary, in the list, find Microsoft Word.app then click on Choose and in the input searcher write "Compare"
and you will see all the commands available to compare two .docx files using Microsoft Word Office and AppleScript
Related
I have folders full of log files, and I'd like to display their final status in a column in the folder they are in. That is, in Details view I want to make a new column that shows a piece of text which is extracted from each file. I don't expect to find such a thing out there, and the searches I've tried haven't even yielded a hint about how I would go about writing a plugin to do any such thing. Is it possible?
This sort of thing used to be possible with custom column handler shell extensions but Microsoft removed support for those in Vista (3rd-party Explorer replacements might still support them).
Microsofts inadequate replacement are property handlers. You cannot do this for .log files, you would have to invent a .myapp-log file extension.
Some people abuse the Windows 10 cloud API to create columns but that only works in specific folders.
If you are looking for a specific string in the last line, you could perhaps use a custom icon handler for .log files.
I have a MS Word 2010 document that has a lot of Content Contorl (100s). I want to find a Content Control by tag name from the UI, not a VB script. Using the standard "Find" does not do it. None of the "find" options seem to help.
Is it even possible without using a VB Script?
In a word, no. As you have discovered, there is no 'Find' option for this in the UI.
I'm working on a program that acts as a Windows Accessibility / UI Automation API client, consuming accessibility data from other programs (much like a screen reader does). I'm looking for a way to get the full path of the current "document" (or other file) open in a program. So, for example, Word might give me the path to the current .docx file, Paint the path to the current image file, WMP the path to an audio or video file... you get the idea. Is there a way to do this?
On a Mac, I'd use NSAccessibilityDocumentAttribute, but Windows doesn't seem to have an equivalent accessibility property. A few other questions I looked at:
Getting the path & filename of the open document in any Windows application (last answer in 2009, may have been unaware of accessibility APIs, no answer gives reliably accurate data)
How to get filename and path of file opened in Notepad? - five years old, specific to one program, only answer given is incomplete.
So... is there any equivalent to NSAccessibilityDocumentAttribute, and if not, is there a reasonable way to re-implement it (possibly doing stuff outside of the accessibility tree / API)? It's more important that this return correct information (i.e. never give me a file that isn't open in the relevant program/window) than that it be universally available.
I'm using C# (via System.Windows.Automation for accessibility) but could use other languages if needed, so long as they'll run on Windows 10 (downlevel support nice but not mandatory).
Newbie here. I thought I knew enough about scripting for this, and have tried many Automator and AppleScript snippets from the Web without success.
I want to create a Mac OS X 10.8.4 Workflow/Service for MS Word 2011 to save a doc in two places simultaneously, i.e.:
Save the current Word doc to my laptop hard disk:
“Home Folder/[Specific Document Folder]/[Document Name]”.
Concurrently save the same document with the same name to my Dropbox folder:
“Home Folder/Dropbox Folder/[Specific Document Folder]/[Document Name]”.
The paths are identical except for the insertion of the “Dropbox Folder” in the path name.
I want to build a Workflow that requires no user input other than one initial key combo or toolbar click to save a Word doc (no matter which doc I’m working on, no matter which folder) to both its current folder and to its Dropbox folder.
I’ve searched for, but can’t find, an Action in Automator to Get the current MS Word doc’s full path and name; the only Action I’ve found returns just the name. I suspect I need to insert a Run Script Action into my Workflow, but I don’t know how to write the script to get the path name, and then insert the “Dropbox Folder” text into that path name for Automator's Save As Action.
Any help would be greatly appreciated. Thanks much.
I'm using Outlook 2007. I have no experience with Windows programming or VBA, as all of my background is on Unix systems. I am attempting to have Outlook save each incoming emails as text file, and then a run a python script which will parse this text file.
I found this question which seems to provide some VBA code to accomplish the first task, but I'm not sure how to utilize it. I open the Visual Basic Editor, but have no idea how to proceed from there. I tried saving the text as a module, but when I attempt add "run a script" in an Outlook rule, no scripts are available. What am I doing wrong?
EDIT: Clarification.
I'm assuming you're familiar with coding at some level, even if not on Windows. You may want to do some general background reading on Outlook VBA; some resources on this would be a Microsoft article, this article from OutlookCode, and so on - there's a ton of resources out there with walkthroughs and examples.
Addressing your specific question: take a look at this Microsoft KB article, which describes how to trigger a script from a rule.
The key to getting started once you've gotten your VBA editor open is to double-click a module on the left, for example ThisOutlookSession (under 'Microsoft Outlook Objects').
That should give you an editor you can paste code into. Bear in mind that (per the above MS page) your procedure must accept a MailItem object, which will be the item that the rule has in hand, so the linked example you gave would have the first couple of lines changed from:
Sub SaveEmail()
Dim msg As Outlook.MailItem
' assume an email is selected
Set msg = ActiveExplorer.Selection.Item(1)
' save as text
[...]
...to:
Sub SaveEmail(msg As Outlook.MailItem)
' save as text
[...]
Essentially you're being handed a MailItem rather than having to create it and connect it to the selected item in Outlook.
To achieve the second task of 'running a script' on the file, I'm assuming that you want your VBA to make changes to the file after it's been saved? This is pretty straightforward in VBA, and you'll find lots of examples for it. One pretty simple outline is in this answer.
Edit based on comments: to launch an external tool, you can use either the Shell command if you don't need to wait for it to complete, or you can use one of the many Shell-and-wait implementations floating around, for example this popular one. Or, you can use the WScript approach in this answer.
Note that you'll need to ensure Outlook is set to allow macros to run, and you will probably want to sign your code.