Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2017, 11:43 PM
afshin afshin is offline Number Format Changing in DocVariable method Windows 8 Number Format Changing in DocVariable method Office 2013
Novice
Number Format Changing in DocVariable method
 
Join Date: Oct 2016
Posts: 4
afshin is on a distinguished road
Default Number Format Changing in DocVariable method


I defined some DocVariable for some date and numbers in my word file, my file is in Persian format.when i run vba macro to replace new numbers in place of defended DocVariable, number format that define in DocVariable changes to English. New number contents loaded from other Excel file by my word vba macro .
I want to all of numbers in my word file be in persian format or arabic.
problem is about changing space format in DocVariable. i define space format in DocVariable by persina mode(shown that in fa attached file )but when closing that file and opening again,that space format changes to englis format(shown that in en attached file).
Attached Images
File Type: png en.png (21.2 KB, 18 views)
File Type: png fa.png (20.5 KB, 18 views)
Attached Files
File Type: docx nohob.docx (60.7 KB, 9 views)
Reply With Quote
  #2  
Old 08-06-2017, 01:19 AM
macropod's Avatar
macropod macropod is offline Number Format Changing in DocVariable method Windows 7 64bit Number Format Changing in DocVariable method Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your document contains many variables, their names & content are:
v10 130.78
v100 0.98
v101 0.92
v102 0.00
v103 11.25
v104 4.59
v105 10.60
v106 0.00
v107 77.02
v108 143.20
v109 76.44
v11 83.42
v110 84.42
v111 0.65
v112 1.21
v113 0.65
v114 2.74
v115 7.32
v116 7.58
v117 1,436.35
v118 130.85
v119 4.05
v12 158.32
v120 3.17
v121 8.95
v122 230.22
v123 217.00
v124 107.91
v125 214.67
v126 137.08
v127 0.71
v128 0.74
v129 0.66
v13 0.88
v130 0.36
v131 40.75
v132 0.96
v133 0.00
v134 0.73
v135 89.33
v136 100.58
v137 99.79
v138 61.78
v139 0.75
v14 0.94
v140 0.83
v141 0.51
v142 0.08
v143 1.54
v144 9.03
v145 1,433.43
v146 139.45
v147 1,433.25
v148 143.20
v149 1,436.32
v15 0.60
v150 124.22
v151 1,437.21
v152 84.03
v153 1,432.41
v154 36.99
v155 4.08
v156 3.21
v157 5.84
v158 321.74
v159 324.99
v16 8.07
v160 123.67
v161 293.59
v162 1.06
v163 1.15
v164 0.97
v165 1.77
v166 9.35
v167 0.00
v168 69.82
v169 45.10
v17 9.32
v170 85.97
v171 82.09
v172 0.61
v173 0.40
v174 0.73
v175 3.98
v176 4.82
v177 4.66
v178 1,440.03
v179 74.76
v18 1,439.87
v180 1,437.39
v181 52.77
v182 165.07
v183 202.03
v184 86.54
v185 240.29
v186 0.80
v187 1.02
v188 3.69
v189 4.63
v19 190.77
v190 7.01
v191 6.75
v192 0.00
v193 0.00
v194 0.00
v195 0.00
v196 0.00
v2 128.15
v20 1,432.16
v201 0.00
v202 0.00
v203 0.00
v204 0.00
v205 0.00
v206 0.00
v207 0.00
v208 0.00
v209 0.00
v21 119.17
v210 0.00
v211 0.00
v212 0.00
v213 1.06
v214 0.67
v215 0.41
v216 0.31
v217 0.42
v218 0.21
v219 0.72
v22 1,437.63
v220 0.37
v221 0.82
v222 0.44
v223 0.71
v224 1.16
v23 104.15
v24 1,431.37
v25 42.87
v26 7.87
v27 1.31
v28 7.85
v29 330.06
v3 1,442.64
v30 195.34
v31 53.63
v32 211.94
v33 1.05
v34 0.66
v35 0.18
v36 53.69
v37 0.14
v38 4.32
v39 97.48
v4 164.02
v40 64.57
v41 53.62
v42 50.67
v43 0.80
v44 0.54
v45 0.43
v46 6.56
v47 6.30
v48 2.73
v49 1,439.76
v5 1,439.56
v50 223.03
v51 1,431.13
v52 128.68
v53 1,438.21
v54 119.67
v55 1,431.24
v56 51.35
v57 2.57
v58 1.57
v6 32.98
v60 360.96
v61 221.75
v62 90.99
v63 232.88
v64 194.36
v65 1.22
v66 0.75
v67 0.78
v68 0.57
v69 33.49
v7 1,441.95
v70 0.92
v71 10.80
v72 2.33
v73 56.77
v74 102.35
v75 115.12
v76 52.08
v77 0.44
v78 0.83
v79 0.91
v8 59.31
v80 0.00
v81 0.00
v82 0.00
v83 1,429.53
v84 191.39
v85 1,438.47
v86 200.60
v87 1,431.32
v88 130.50
v89 1,432.23
v9 122.24
v90 61.03
v91 5.24
v92 2.45
v94 267.51
v95 280.98
v96 59.91
v97 280.04
v98 0.00
v99 0.80
vd1 31/03/96
vd2 30/03/96
It's not apparent what the issue is with the DOCVARIABLE display.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-06-2017, 03:11 AM
afshin afshin is offline Number Format Changing in DocVariable method Windows 8 Number Format Changing in DocVariable method Office 2013
Novice
Number Format Changing in DocVariable method
 
Join Date: Oct 2016
Posts: 4
afshin is on a distinguished road
Default

i want to my report in persian mode (similar "Persian" attached file, but my produced file is similar "English" attached file.
Attached Images
File Type: png English.png (122.6 KB, 18 views)
File Type: png Persian.png (121.1 KB, 18 views)
Reply With Quote
  #4  
Old 08-06-2017, 03:21 PM
macropod's Avatar
macropod macropod is offline Number Format Changing in DocVariable method Windows 7 64bit Number Format Changing in DocVariable method Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In that case, you'd have to populate the document variables with Persian characters; it appears you're populating them with ASCII characters.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Format Changing in DocVariable method afshin Word 0 08-02-2017 12:26 AM
Number Format Changing in DocVariable method Changing caption number format dpashley Word 1 05-02-2017 03:53 PM
Number Format Changing in DocVariable method Help needed in changing date format Rose roon Excel 5 07-27-2015 11:57 PM
Number Format Changing in DocVariable method How to format a TOC (level 1) using a number, but have the number hidden in the text porpoiseoil Word 1 09-13-2014 12:53 PM
Change from General Format to number format gbaker Excel 3 08-16-2013 01:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft