File Converter Macro Download

broken image


File Converter Macro. Joan over 9 years ago. Hi, I would like to use the supplied macro to convert a folder of cdr's to ai's but some are portrait and some are landscape - actually, I even have some that are. Download Word Macro Software. Batch Word File Converter v.3.5.1.5 Batch Word File Converter is a unique. Here is the macro that loops through all the file paths that are contained in column 'B' of the sheet 'Paths' and converts the PDF files to a different file type. The macro ExportAllPDFs uses the SavePDFAsOtherFormatNoMsg macro, which is similar to SavePDFAsOtherFormat macro.

  1. Macro Download Roblox
  2. Office File Converter Download

Automatically convert Pinyin with tone numbers
to Pinyin with tone marks (diacritics)

Downloads

Microsoft Office
Windows or Mac*
LibreOffice or OpenOffice
Windows, Mac, or Linux
Word — whole documents
(Supports tables.)
Writer — whole documents
Word — selected text
(Selected text or text before cursor.)
Writer — selected text
(Selected text only.)
Excel — selected cells
Calc — selected cells
PowerPoint
Impress - not yet available
(Want to help?)

*Not Compatible with Office for Mac 2008 or Apple iWork. See FAQ for more info.

DOWNLOAD this 3.6 MB ZIP FILE which includes a macro which allows you to add page numbers to your CorelDRAW document. There's a movie in the.zip file showing you how to install the macro, and then. Jun 06, 2015 'The macro loops through all the URLs (column C) and downloads the files at the specified folder. 'The characters after the last '/' of the URL string are used to create the file path. 'If the file is downloaded successfully an OK will appear in column D (otherwise an ERROR value).

Pinyin Macro Instructions
OverviewUse The Right FontInstallationRuby Text

Pinyin Macro Help
FAQs & Technical NotesContact Information


Overview

These macros are very simple to use, as easy as '1-2-3':

  1. Type Pinyin with numbers representing the tones, as in 'Han4yu3 Pin1yin1'.
  2. Select the text or document you want to convert.
  3. Run the macro. Done.

To run macros, in Word or Excel for Windows press or add the macro to your Quick Access Toolbar. In Office for Mac, go to Tools > Macros. In Libre/OpenOffice, go to Tools > Macros > Run Macro..

Use The Right Font

To use this macro, the only other thing to remember is that you'll need to select a font that includes letters with these diacritics. Otherwise you may find that in each word the one letter with a tone will be in a different font.

In Ubuntu Linux, I've found the default Liberation Serif and the other 'Liberation' fonts do not have everything we need, but Free Sans, DejaVu Sans, DejaVu Serif, 'Ubuntu' and many others look great. Starting with 16.04 / Xerus, Ubuntu includes the Google Chinese font Noto Sans CJK (also available for other systems as a free download under that name or as Adobe Source Han Sans), and that font also includes all the letters with diacritics we require for Hanyu Pinyin tones.

Macs have had Unicode fonts for years. Not every font on a Mac will have these letters, but worrying about Unicode fonts is mostly a Windows thing these days, and Microsoft is getting better and better about that too.

In Windows, use one of these:

Latin fonts

Arial
Courier New
Times New Roman
Calibri*
Cambria*

In recent versions of Office, these 'core' fonts have been updated to include at least enough of the Unicode character set to display Pinyin with tone marks. (See my note below about the default Calibri and Cambria fonts in Office 2007. Office 2010 and later are OK).

Arial Unicode MS The default Unicode font, included since MS Office 2000. Safest for use in Access databases too.
Lucida Sans UnicodeThe default Unicode font in earlier versions of Windows. Also used in Mac systems.
Chinese fonts
Microsoft YaHeiIncluded with Windows 8 and later.
Adobe Source Han Sans (Google Noto Sans CJK)Free open-source Pan-CJK font.

*Windows Office 2010 and later versions include all of these fonts, but Calibri and Cambria did not include all the necessary characters in Office 2007 until I installed Office Multi-Language Pack 2007.

Office XP (2002) and 2003 include the latest Arial, Courier New and Times New Roman, and those editions also normally install the Arial Unicode MS font as the 'Universal Font', also known as the 'Unicode Font' as part of International Support.

In Office 2000 that font is an option. If you did not install it, for either XP 2002/2003 or 2000, follow the instructions for 'Installing the Unicode Font' on Microsoft's 'Administering Fonts for Office XP' page.

Installation

Click one of the download links at the top of this page, and copy/extract the file to your PC.

To install in Microsoft Office, open Word or Excel and in Windows press , or on a Mac go to Tools > Macros. Type a name for the macro and hit the 'Create' button. Then open the downloaded file, select all the text and copy it into a blank macro. Note my instructions in each macro on exactly where and how to paste it, especially the part about the 'sub' and 'end sub' lines. 99 times out of 100, the reason a macro doesn't work will be a mistake pasting it in during this step.

The MS Office Help files on this topic are actually are pretty good. Open Help, enter 'macro' in the Help index, and drill down to info on creating a macro 'from scratch'. (Note that Excel can be especially difficult about security: you must enable macros, and in recent versions of Excel you must save your final spreadsheet as a macro-enabled file.)

To install in OpenOffice or LibreOffice, go to Tools > Macros > Organize Macros > LibreOffice (or OpenOffice) Basic to create a macro and paste in my code. Here's a link to someone offering more detailed help: 5 Steps to Creating an OpenOffice Macro. In his step 5, instead of writing a macro you would paste in one of mine, making sure to follow my instructions in the macro comments about deleting the 'sub Main' and 'end sub' lines automatically created for any new blank macro.

When running these macros in OOo or LibrO, if you get a message saying you need a 'Java runtime environment' (JRE), that has nothing to do with me and you can run macros without it, but I know how to make that annoyance go away in Linux: install OpenJDK Java Runtime. This is easy in Ubuntu. Open Software Center, search for LibreOffice, click the 'More Info' button, scroll down to find OpenJDK Java Runtime, select it and click the 'Apply changes' button above.

The Help files on this topic included with Open/LibreOffice are not very detailed, but there is some information there. Look under 'Macros' (plural) and click through 'Organize Macros' to 'LibreOffice Basic'.

Edit

See also the Troubleshooting section of the Pinyin macro FAQ page. If you get ambitious, the Help files in the Basic editors (launched when you click the 'Edit' button in the macro dialog) can help you add tweaks of your own. For example, you can tell the MS Word macro to search forward from your cursor instead of backwards by setting '.Forward=' to 'True', or you can remove that feature entirely.

Ruby Text

Although you can use this macro to create 'ruby' text (small phonetic transcriptions aligned above or alongside Chinese characters), there is an easier way: there are inexpensive Chinese character fonts available that include Pinyin ruby text, and there are the Phonetic Guide features of Word and Writer. With any of these options you'll have to input the Chinese characters first of course. See this section of my Zhuyin setup page for more information on Zhuyin and Pinyin ruby fonts, and Microsoft Word's Phonetic Guide, and this a brief discussion of Phonetic Guide in LibreOffice/OpenOffice (in my Ubuntu Linux section, but there is also a version of OpenOffice for Windows), which someone is trying to automate by developing an an extension called OOPinyinGuide.

Need More Help?

Please see the Troubleshooting section on the macro FAQ page, and feel free to send send questions, comments or suggestions anytime via the contact page.

iMacros automatically detects and intercepts downloads. Use this command, which has to occur before the download starts, to determine the location and name of the saved file.

  • 1New for iMacros Browser 10.3
  • 2iMacros for Firefox, Chrome and iMacros prior to 10.3

New for iMacros Browser 10.3


The time taken for a file download is limited by !TIMEOUT_DOWNLOAD. If this value is not set in the macro, iMacros uses !TIMEOUT_PAGE. Make sure !TIMEOUT_DOWNLOAD is long enough to cover the complete download time, otherwise iMacros will stop with error = -1330: Page or Download Timeout.

If the macro ends before the download completes, but the browser is still open, the download continues but iMacros is no longer able to show errors which might arise because the download timed out.

The macro should still be running when the download starts, or iMacros cannot catch the download. Often websites need a few seconds for the download to start, so in case an ONDOWNLOAD command is present in a macro, but at macro playback end no download has started, iMacros will wait for up to an additional !TIMEOUT_STEP seconds before aborting with error -1410: No Download Detected.

Syntax

-or-

Parameters

  • FOLDER
    Specifies the folder in which the file is saved. Use * for the standard download folder specified in the options.
    Note that blank spaces in the path need to be replaced by like in c:myfolder, or surrounded with quotes and backslashes escaped with another backslash as in 'c:my folder'.
    iMacros for Chrome and Firefox freeware versions: FOLDER is not supported and downloads will always save to the browser's default download folder. File Access for iMacros Extensions is required to be able to specify a different location.
  • FILE
    Specifies the file name under which the file is saved. If no file extension is given, the server set default file extension is used. Use * for the original file name. Use +something to add something to the original file name before the file extension.
    • Normally the download file name is created automatically by the website. You can add parts to the original file name by using the + syntax (see Examples). The built-in variable !NOW is helpful in this context.
    • The full path of the downloaded file is stored in !DOWNLOADED_FILE_NAME
  • WAIT
    Specifies if iMacros should wait for the download to complete (WAIT=YES) or continue with the macro without waiting (WAIT=NO). Default is NO
  • CHECKSUM
    Calculates the checksum of a downloaded file and compares it with the value specified (as a hexadecimal string), using either MD5 or SHA-1 hash functions. It requires WAIT=YES.
  • SIZE
    Compares the downloaded file size in bytes with the value specified. It requires WAIT=YES.
    • If either CHECKSUM or SIZE is specified and does not match the values for the downloaded file in the disk, iMacros stops with error -1420: Checksum or Size Not Verified. iMacros also displays the calculated/measured value in the error message. Furthermore, you can retrieve the size of the downloaded file with the variable !DOWNLOADED_SIZE
  • CANCEL
    Stops automatic download from websites.

Examples

Suppose you download a file originally called setup.exe. The following snippet will save this file under the original file name in the default folder:

This command will save the file in the C:MyFiles folder under the name myDownload.exe:

And finally, this command will save the file in the default directory under the name with an added date stamp (using the !NOW variable), e.g. setup_141231.exe.

If you want to make sure that the downloaded file checksum matches the original MD5 checksum (say, CF78F0A6AFC3B5A37758BBBE04F61C9D) use

Remarks

Pdf

See also the Troubleshooting section of the Pinyin macro FAQ page. If you get ambitious, the Help files in the Basic editors (launched when you click the 'Edit' button in the macro dialog) can help you add tweaks of your own. For example, you can tell the MS Word macro to search forward from your cursor instead of backwards by setting '.Forward=' to 'True', or you can remove that feature entirely.

Ruby Text

Although you can use this macro to create 'ruby' text (small phonetic transcriptions aligned above or alongside Chinese characters), there is an easier way: there are inexpensive Chinese character fonts available that include Pinyin ruby text, and there are the Phonetic Guide features of Word and Writer. With any of these options you'll have to input the Chinese characters first of course. See this section of my Zhuyin setup page for more information on Zhuyin and Pinyin ruby fonts, and Microsoft Word's Phonetic Guide, and this a brief discussion of Phonetic Guide in LibreOffice/OpenOffice (in my Ubuntu Linux section, but there is also a version of OpenOffice for Windows), which someone is trying to automate by developing an an extension called OOPinyinGuide.

Need More Help?

Please see the Troubleshooting section on the macro FAQ page, and feel free to send send questions, comments or suggestions anytime via the contact page.

iMacros automatically detects and intercepts downloads. Use this command, which has to occur before the download starts, to determine the location and name of the saved file.

  • 1New for iMacros Browser 10.3
  • 2iMacros for Firefox, Chrome and iMacros prior to 10.3

New for iMacros Browser 10.3


The time taken for a file download is limited by !TIMEOUT_DOWNLOAD. If this value is not set in the macro, iMacros uses !TIMEOUT_PAGE. Make sure !TIMEOUT_DOWNLOAD is long enough to cover the complete download time, otherwise iMacros will stop with error = -1330: Page or Download Timeout.

If the macro ends before the download completes, but the browser is still open, the download continues but iMacros is no longer able to show errors which might arise because the download timed out.

The macro should still be running when the download starts, or iMacros cannot catch the download. Often websites need a few seconds for the download to start, so in case an ONDOWNLOAD command is present in a macro, but at macro playback end no download has started, iMacros will wait for up to an additional !TIMEOUT_STEP seconds before aborting with error -1410: No Download Detected.

Syntax

-or-

Parameters

  • FOLDER
    Specifies the folder in which the file is saved. Use * for the standard download folder specified in the options.
    Note that blank spaces in the path need to be replaced by like in c:myfolder, or surrounded with quotes and backslashes escaped with another backslash as in 'c:my folder'.
    iMacros for Chrome and Firefox freeware versions: FOLDER is not supported and downloads will always save to the browser's default download folder. File Access for iMacros Extensions is required to be able to specify a different location.
  • FILE
    Specifies the file name under which the file is saved. If no file extension is given, the server set default file extension is used. Use * for the original file name. Use +something to add something to the original file name before the file extension.
    • Normally the download file name is created automatically by the website. You can add parts to the original file name by using the + syntax (see Examples). The built-in variable !NOW is helpful in this context.
    • The full path of the downloaded file is stored in !DOWNLOADED_FILE_NAME
  • WAIT
    Specifies if iMacros should wait for the download to complete (WAIT=YES) or continue with the macro without waiting (WAIT=NO). Default is NO
  • CHECKSUM
    Calculates the checksum of a downloaded file and compares it with the value specified (as a hexadecimal string), using either MD5 or SHA-1 hash functions. It requires WAIT=YES.
  • SIZE
    Compares the downloaded file size in bytes with the value specified. It requires WAIT=YES.
    • If either CHECKSUM or SIZE is specified and does not match the values for the downloaded file in the disk, iMacros stops with error -1420: Checksum or Size Not Verified. iMacros also displays the calculated/measured value in the error message. Furthermore, you can retrieve the size of the downloaded file with the variable !DOWNLOADED_SIZE
  • CANCEL
    Stops automatic download from websites.

Examples

Suppose you download a file originally called setup.exe. The following snippet will save this file under the original file name in the default folder:

This command will save the file in the C:MyFiles folder under the name myDownload.exe:

And finally, this command will save the file in the default directory under the name with an added date stamp (using the !NOW variable), e.g. setup_141231.exe.

If you want to make sure that the downloaded file checksum matches the original MD5 checksum (say, CF78F0A6AFC3B5A37758BBBE04F61C9D) use

Remarks

iMacros Browser download manager

iMacros Browser 10.3 and above features a new download manager which deals with downloads during playback completely without dialogs. Download progress is shown on the status bar through a progress bar and a value indicating the size of the downloaded file. You can hover over this value to see the total size in bytes. Moreover, in iMacros log file you find

  • the URL of the downloaded file,
  • the size of downloded file, and
  • the full path of the file in the disk.

The iMacros Browser download manager is able to download file types which are registered in the system to be open by an application (usually the case of PDF files), instead of opening them. There is no need to disable the application.

If you prefer the old download manager (dialogs) you can set !USE_DOWNLOADMANAGER NO in the macro before the ONDOWNLOAD command.

Notes

In IE, make sure 'Always ask before opening this type of file' is not checked
  1. FOLDER does not accept relative path, FILE does. In case you want to download to a subfolder under the iMacros downloads folder, you can use the FILE parameter, but that subfolder needs to exist prior to the download.
  2. Just the FOLDER parameter creates folders, so if the folder is not there yet, it has to appear in FOLDER, not in FILE.
  3. Blank spaces in the path need to be replaced by like in c:myfolder, or surrounded with quotes and backslashes escaped with another backslash as in 'c:my folder'.
  4. In Internet Explorer (but not the iMacros Browser) you need to enable the automatic prompting for downloads, to avoid the notification bar.
  5. Also in Internet Explorer, for some file types (e.g. zip and Excel files) you may need to change a setting to tell IE not to prompt to open the file. One has to first manually download such a file, then open the downloads view (Ctrl+J), right-click on the file to retrieve its context menu and disable 'Always ask before opening this type of file'
  6. When using Internet Explorer, the file is first downloaded to the user's Downloads folder (e.g. C:UsersDownloads) and then copied to the target folder specified by the FOLDER parameter. The original file in the user's Downloads folder is not removed because there is a chance that iMacros does not have enough information to correctly identify the original file, so the decision was made to leave it there rather than risk removing the wrong file.
  7. In Internet Explorer, while working with certain protocols especially FTP, there's a chance that the files get downloaded only into the user's Downloads folder (e.g. C:UsersDownloads) instead of the folder specified in the FILE parameter.

iMacros for Firefox, Chrome and iMacros prior to 10.3

The general web page timeout also applies to downloads. Make sure that the timeout value is long enough to cover the complete download time.

Normally the download file name is created automatically by the website. You can add parts to the original file name by using the + syntax (see Examples). The built-in variable !NOW is helpful in this context.

iMacros can calculate the checksum of a downloaded file and compare it with the value of the CHECKSUM parameter. This is very useful to verify that file downloads are not corrupted, or worse, have been infected by a virus or trojan horse (e. g. via a hacked server). Both the MD5 and the SHA1 checksums are supported.


Important notes:

  • The maximum allowed download time is set by !TIMEOUT_PAGE (60s by default). So it is treated as page download (timeout wise). If you need to allow longer file downloads, please increase this value e. g. with SET!TIMEOUT_PAGE 300. If the download is completed before 5 min (300s) are over, the macro continues. Otherwise you get a timeout error.
  • VERY IMPORTANT:The macro must still be running when the download dialog appears, otherwise iMacros can not catch it. Often websites need a few seconds for the download to start, so make sure the macro is still active then, e. g. by adding a short wait statement at the end. This wait time is not for the download itself, but only for the time the site needs for the download dialog to appear. If the macro continues with other commands, you will not need such a WAIT statement, you need it only when the download is at the end of the macro.

Example:

  • If the download does not start before the end of the macro, iMacros will wait for up to an additional !TIMEOUT_STEP seconds before aborting with error -1410: No Download Detected.
  • To avoid Firefox prompting for how to handle the file being downloaded, set the default action as Save File in Firefox preferences. See iMacros for Firefox, Downloading Files
  • To download multiple files in iMacros for Firefox Quantum v. 10 the macro should also have a short waiting time (1 or 2 seconds) between a TAG command which triggers the download and the next ONDOWNLOAD command to give time for the download to be created. For example:



Syntax

-or-

Parameters

  • FOLDER
    Specifies the folder in which the file is saved. Use * for the standard download folder specified in the options.
    Note that blank spaces in the path need to be replaced by like in c:myfolder, or surrounded with quotes and backslashes escaped with another backslash as in 'c:my folder'.
    (v10 and later) The specified folder must already exist on disk, it will not be created automatically.
    iMacros for Chrome and Firefox freeware versions: FOLDER is not supported and downloads will always save to the browser's default download folder. File Access for iMacros Extensions is required to be able to specify a different location.
  • FILE
    Specifies the file name under which the file is saved. If no file extension is given, the default file extension is used. Use * for the original file name. Use +something to add something to the original file name before the file extension.
  • WAIT
    Specifies if iMacros should wait for the download to complete (WAIT=YES) or continue with the macro without waiting (WAIT=NO), Default is YES
  • CHECKSUM
    Calculates the checksum of a downloaded file and compares it with the value specified (as a hexadecimal string), using either MD5 or SHA-1 hash functions. Note: CHECKSUM requires WAIT=YES.
  • CANCEL
    Stops automatic download from websites. Note, the CANCEL parameter is implemented in versions above iMacros v9.01 and is not available in iMacros for Firefox and Chrome yet.

Examples

Suppose you download a file originally called setup.exe. The following snippet will save this file under the original file name in the default folder:

This command will save the file in the C:MyFiles folder under the name myDownload.exe:

And finally, this command will save the file in the default directory under the name with an added date stamp (using the !NOW variable), e.g. setup_060525.exe.

Note: The '+' symbol is only required if you want to add text to the default file name (as created by the website). In this case, '+' must be the first symbol, directly after FILE=+.. .The '+' is not required (and not allowed) if you want to concatenate several variables. To concatenate variables just use them as part of the string. Example: FILE=invoice_no{{number}}_unit{{departement}}.pdf


You can verify the integrity of the downloaded file using the CHECKSUM parameter. Here the expected checksum was previously calculated as a hexadecimal string using the SHA-1 function.

3d free download. In case you want to avoid (single or multiple) automatic downloads, you can make use of the CANCEL parameter. The CANCEL parameter can be specified only when other parameters are omitted and is effective until one of the following commands occurs: ONDOWNLOAD CANCEL=NO, or ONDOWNLOAD FOLDER=.. FILE=..


Example macros: Demo-FileDownload, Demo-ImageDownload Best buy adobe elements.

PDF Downloading

Please make sure you uninstall or disable PDF handling browser addons, such as Adobe. Then the browser prompts you to download the PDF as regular download - and iMacros can automate it.

Automating, testing and monitoring PDF file downloads is easy with iMacros.

See also: Prevent IE from opening PDFs

Website for testing: PDF Download Test

Notes

Macro Download Roblox

  1. The download dialog needs a short while to appear after it is triggered and iMacros should to be running to catch it. If the macro ends right after the command which triggers the download, iMacros will not be able to catch the dialog. In this case, we suggest adding
after the command which triggers the download. This gives iMacros time to wait for the dialog.
The parameter WAIT=YES refers to another waiting, namely after the download has started it should wait for the download to complete.
  1. In Internet Explorer (but not the iMacros Browser) you need to enable the automatic prompting for downloads, to avoid the notification bar.
  2. It is highly necessary to have the option to hide file extensions (in Windows Explorer) disabled! Otherwise, iMacros may fail to rename the file when specifying something other than the original file name (e.g. when not using the default FILE=*).
  3. The FOLDER parameter is not supported in the freeware versions of iMacros for Chrome and Firefox, downloads will always save to the browser's default download folder. File Access for iMacros Extensions is required to be able to specify a different location.
  4. FOLDER does not accept relative path, FILE does. In case you want to download to a subfolder under the iMacros downloads folder, you can use the FILE parameter, but that subfolder needs to exist prior to the download.
  5. Just the FOLDER parameter creates folders, so if the folder is not there yet, it has to appear in FOLDER, not in FILE.
  6. Blank spaces in the path need to be replaced by like in c:myfolder, or surrounded with quotes and backslashes escaped with another backslash as in 'c:my folder'.

Office File Converter Download

Related Forum Posts

For iMacros for Firefox:

  • Tips for downloading files with ONDOWNLOAD Describes issues specific to some Firefox settings.

Other:

See Also

CHECKSUM, !TIMEOUT_DOWNLOAD, !DOWNLOADED_SIZE, !DOWNLOADED_FILE_NAME, !USE_DOWNLOADMANAGER

Retrieved from 'https://wiki.imacros.net/index.php?title=ONDOWNLOAD&oldid=11047'




broken image