Page 7 of 11 FirstFirst ... 56789 ... LastLast
Results 91 to 105 of 156
  • Thread Tools
  1. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi macropod one thing i have to ask that in mscrm we have currency type of number field how can i convert this into numeric integer or decimal to calculate the total please help is there any way to convert the type in mail merge

  2. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    If the problem is with adding mergefield values that already have a currency symbol before the values, you could simply add the '\* arabic' switch to the mergefields concerned.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi macropod sorry for late reply ...ok i have solved those issues but i have another one i want to calculate the subtotal for non optional products how can i achieve that and also ths sunm of all sub total of non optional products please help

  4. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi macropod did you see my last message please help

  5. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    Quote Originally Posted by addiaddi_79 View Post
    Hi macropod did you see my last message please help
    Please learn to be patient. Some of us have lives to live outside of answering forum questions. Furthermore, this kind of field coding doesn't just materialize out of thin air; if it was that easy you wouldn't need help.

    You asked for code to calculate the group totals as well as the sub-group totals. See attached.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks alot macropod it works

  7. Bronze Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Madison, Wisconsin, Wisconsin, USA
    Posts
    1,422
    Thanks
    15
    Thanked 23 Times in 22 Posts
    Wow! Thank you for putting this together. I will be adding a link to it from my Mail Merge page.
    Charles Kyle Kenyon
    Madison, Wisconsin

  8. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if the LastItem="1" so can i run the merge again from start like a loop???

  9. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    Quote Originally Posted by addiaddi_79 View Post
    if the LastItem="1" so can i run the merge again from start like a loop???
    I have no idea what you're referring to. There is no 'LastItem' in the field code I provided, or in any of tutorial examples.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  10. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi macropod;
    yes there is no field used in your tutorial but we can use LastItem as a field codes in mail merge ok what i want that loop through the records again Example:in our case when we do mail merge we throgh all the records and and display them in the desired format when we finish with the first time i want to do it again in the same tempalte becauee i want to display data in one format an then same data with another format in the same template is it possible to loop throguh the records

  11. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    There is no Word field that can test whether you have reached the last item in a mailmerge, much less implement a loop. If you're using a dummy last record as indicated in the tutorial, you can know it's the last item, but Word does not - as far as Word is concerned it's just another record. You will need to execute two separate mailmerges. Since you want two separate formats, I suggest you create two separate mailmerge main documents - one for each format. The only way to implement a loop would be with vba but, if you're using vba, then you don't need all the field coding that goes with the non-vba solution.

    If you want to explore vba solutions, you may want to try a Many-to-One Mail Merge add-in from either:
    • Graham Mayor at: http://www.gmayor.com/ManyToOne.htm
    • Doug Robbins' Windows Live SkyDrive page at: https://skydrive.live.com/?cid=5aedc...615E886B%21111
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  12. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi macropod;

    as we discuss about the looping through the datasource can you please suggest me any tutorial or example for vba solution because i am struggling please help
    Last edited by macropod; 2012-05-26 at 01:20. Reason: Deleted post x-ref made invalid after thread pruning

  13. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    Hi addiaddi,

    The barebones code could be something like:
    Code:
    Dim i As Long
    With ActiveDocument.MailMerge.DataSource
      For i = .FirstRecord To .LastRecord
        'Do your 1st round of processing here
      Next
      For i = .FirstRecord To .LastRecord
        'Do your 2nd round of processing here
      Next
    End With
    I don't understand why you'd want to do something like you're suggesting, though, as you could just as easily (if not more so) execute two mailmerges - one for each format, and preferably using two different mailmerge documents.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  14. Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,303
    Thanks
    0
    Thanked 93 Times in 91 Posts
    Cross-posted at: http://www.vbaexpress.com/forum/showthread.php?t=42175
    For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  15. Lounger
    Join Date
    Apr 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thx Macropod ;

    this is the client requirement.that's why i really appreciate your replies.i will have to do something through macro vba thanks anyway

Page 7 of 11 FirstFirst ... 56789 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •