+ Reply to Thread
Results 1 to 3 of 3

strange behaviour of WordDoc.Bookmarks("bkmark").Range.InsertAfter

  1. #1
    Forum Contributor
    Join Date
    08-20-2019
    Location
    Mumbai
    MS-Off Ver
    Office 365
    Posts
    101

    strange behaviour of WordDoc.Bookmarks("bkmark").Range.InsertAfter

    Hi, Request some help with my code.

    This code is running from Excel VBA app. I have the below code to insert items of a Listbox into cells of a Word table.
    The same piece of code is repeated for two cells in a table. However in one cell the alternate items become bold whereas in other cell all the items appear as regular font - which is required. Please see the attached screenshot of the end result.

    I tried to reformat the problem cell by: deleting the bookmark, making the entire cell font as regular font and then only changing the header of the cell as bold(without making the last two characters(:-) bold). Yet the end result is the same - the alternate items gets displayed as bold font. See the attached image of end result.

    Any idea why?


    Please Login or Register  to view this content.
    Attached Images Attached Images

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: strange behaviour of WordDoc.Bookmarks("bkmark").Range.InsertAfter

    The behaviour is not caused by the code; it is caused by something in the document. In any event, there is a better way to insert a bulleted list:
    Please Login or Register  to view this content.
    with the following in a separate sub
    Please Login or Register  to view this content.
    Simply make sure your 'List Bullet' Style has the desired attributes. Alternatively, define another Style with the desired attributes and use that.
    Last edited by macropod; 12-22-2019 at 04:44 PM.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    08-20-2019
    Location
    Mumbai
    MS-Off Ver
    Office 365
    Posts
    101

    Re: strange behaviour of WordDoc.Bookmarks("bkmark").Range.InsertAfter

    Thank you Paul.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] strange problem: dot "." changed to coma "," but it schuldnt have been
    By kmeld in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2013, 04:00 AM
  2. Replies: 10
    Last Post: 05-20-2013, 09:42 AM
  3. Suddenly getting "Subscript out of Range" Errors in strange places
    By dcw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2012, 10:03 AM
  4. [SOLVED] strange behaviour: typing "WEI" but Excel enters it like "WIE"
    By buhnen in forum Excel General
    Replies: 3
    Last Post: 05-03-2012, 09:19 AM
  5. "Strange" behaviour when programatically disabling/re-enabling commandbar controls
    By blackworx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2011, 12:49 PM
  6. [SOLVED] Problem with bookmark in Word, "Bookmarks disappear"
    By jesika in forum Word Formatting & General
    Replies: 2
    Last Post: 04-06-2009, 05:27 AM
  7. Excel VBA ".value" / Strange Behaviour!!!
    By ifiaz in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-16-2005, 12:30 AM
  8. Strange "Format>Cells" behaviour
    By Mike Hyndman in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-24-2005, 10:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1