![]() |
|
#1
|
|||
|
|||
![]()
Question: can i use for example WSH call or even more! assembler directives inside my macro. I believe i can, but don't know how.
|
#3
|
|||
|
|||
![]()
How can i use SetLocale from WSH in my VBA for Corel Macro. The reason is too large code to change locale by VBA.
|
#5
|
|||
|
|||
![]()
I working in Russia, some of designer's computers en locale and other ru locale but all of them use some net folder named in english with month's name. My macro for automation builds the path and the code in WSH is:
strPath2Lnk = objFSO.BuildPath(objWshShell.SpecialFolders("SendTo"), "Send to NetPrinterFolder.lnk") prevLocale = SetLocale("en-us") dtNow = Now() strTargetPath = objFSO.BuildPath( _ "\\Print\Work", Right("00" & CStr(Month(dtNow)), 2) & "_" & MonthName(Month(dtNow)) & "\" & Right("00" & CStr(Day(dtNow)), 2) _ ) SetLocale(prevLocale) But there is no simple way to change locale in VBA for my purpose. |
#6
|
||||
|
||||
![]()
Since you are always using English month names, why not just hard-code them like this:
Code:
Function EnglishMonthName(ByVal nMonth As Long) As String Dim monthNames() As Variant monthNames = Array("January", "February", "March", _ "April", "May", "June", "July", "August", _ "September", "October", "November", "December") EnglishMonthName = monthNames(nMonth - 1) End Function |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Photo-Paint Scripts | pudo | Corel Photo-Paint CS | 1 | 13-07-2005 11:48 |
How to use old scripts (.CSC) with CorelDRAW? | Alex | FAQ | 1 | 24-05-2005 10:51 |
Corel 12 Scripts | garyallred | Macros/Add-ons | 1 | 12-02-2004 15:49 |
Trying to make buttons from my scripts | click101 | CorelDRAW/Corel DESIGNER VBA | 0 | 10-09-2003 10:41 |
Can scripts be upgraded? | Wild_Weasel | CorelDRAW/Corel DESIGNER VBA | 1 | 14-01-2003 15:30 |