So I want to write a macro. I know the basics on input and output files but I have no idea how to write a macro.
I want my program to go through a folder of .docx documents do the following operations on each file:
"open, save as..., *.doc, "yes" to overwrite, close, next".
Any idea where to start looking for a method? Or at least if it's doable?
I can do it in C++ or any program that already does this, it doesn't matter to me...
What makes you think you need to use a macro for this? Also, macros are deprecated (at least, the creator of C++ wishes he could remove them from the language).
Also, instead of opening the file and performing the save-as command and clicking yes, why not just copy the file??
Well, to making macros I am no expert but I once made my own clicking macro for a small game I use to play a year ago.
I used a program called "Autoit" it uses c++ and its free. Very easy to use but if you really want to make macro's you'll need to find out what are your mouse coordinates on your monitor. Everyones mouse coordinates are different because of their monitor.
Not sure if that answers your question completely but that is the program I used to write a macro
macros arent deprecated. they are still widely used. but its the same idea as system or goto. very few good uses
Well in C++, macros have better alternatives, however in C they remain an excellent tool.
Edit:
I want my program to go through a folder of .docx documents do the following operations on each file:
"open, save as..., *.doc, "yes" to overwrite, close, next".
"*.doc" and "*.docx" are MS Office formats. Macros in MS Office are written in VB, not C\C++. There are features exposed for C\C++ through the COM but at that point unless you're tying this in with an already made C\C++ app you're better off using VBScript.
Saving from "*.docx" to "*.doc" pops up a warning that some of the functions used in the newer format are not supported in older versions of MS Office and if any of those new features are used the file may not work correctly. If you aren't using any of the newer features then you might be able to get away with simply using "CopyFile()" and changing the extension. In my experience this works with very few problems on Excel so I'm sure you'll have even fewer issues with Word.