VBA Word格式合并域

时间:2016-02-22 06:05:56

标签: excel vba ms-word mergefield

我有一个字段函数,可以从excel表格中格式化给定的数字(价格)。

即:

 <meta name="viewport" content="width=device-width, initial-scale=1.0">




/*==========  Mobile First Method  ==========*/

/* Custom, iPhone Retina */ 
@media only screen and (min-width : 320px) {

}

/* Extra Small Devices, Phones */ 
@media only screen and (min-width : 480px) {

}

/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {

}

/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {

}

/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {

}



/*==========  Non-Mobile First Method  ==========*/

/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {

}

/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {

}

/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {

}

/* Extra Small Devices, Phones */ 
@media only screen and (max-width : 480px) {

}

/* Custom, iPhone Retina */ 
@media only screen and (max-width : 320px) {

}

它可以工作,但是如果值小于一千,则哈希和点将被读作空格。

如何删除或阻止空格显示在word文件中?

1 个答案:

答案 0 :(得分:2)

格式太多# ..这个:

 Fieldname = FieldName & " \# #.#0,00 USD"

只是为了进一步澄清,我真的不知道上面的代码如何通过提问者在mergefield中使用..通常格式化mergefield看起来像这样:

 {MERGEFIELD  ANum \# "#.#0,00 USD"}