+ Reply to Thread
Results 1 to 4 of 4

excel value to word bookmark - macro to keep formatting

  1. #1
    Registered User
    Join Date
    08-10-2017
    Location
    london
    MS-Off Ver
    2016
    Posts
    8

    excel value to word bookmark - macro to keep formatting

    Hi all,

    I lost access to my old email account so having to post for the first time again. Have always found everyone here amazingly helpful and i manage to struggle by with macros compared to most here.

    I have macro which I'm using to copy a cell range 'name' in excel to a bookmark in word with the same 'name'. It works perfectly (and i can't contest to writing it all). However I'm looking for a way to keep the formatting, can anyone help?

    The issue I think is that it's copying over the cell value, but this means it loses any formatting when it reaches the word bookmark. By formatting I mean decimal points etc or format of cell in % etc.

    Using the cell 'name' ranges from excel is extremely helpful, as it means I can edit the excel document, add rows etc and the range name stays the same meaning I do not need to alter the macro. Whereas If i use a copy and paste macro with a keep source formatting code (which would work i think) it would need a lot of manual editing.

    So I'm hoping someone may have a solution to keep the formatting with the below macro!

    Any ideas hugely appreciated.

    Please Login or Register  to view this content.
    Thanks!
    Last edited by excelor100; 08-10-2017 at 03:34 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: excel value to word bookmark - macro to keep formatting

    This will copy the numeric or date formatmatting as displayed in the cell.

    Please Login or Register  to view this content.
    It does not copy any font formatting like Bold, or font style, or font size.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    08-10-2017
    Location
    london
    MS-Off Ver
    2016
    Posts
    8

    Re: excel value to word bookmark - macro to keep formatting

    Quote Originally Posted by AlphaFrog View Post
    This will copy the numeric or date formatmatting as displayed in the cell.

    Please Login or Register  to view this content.
    It does not copy any font formatting like Bold, or font style, or font size.
    Works perfectly thank you!!

    Hugely appreciate your assistance Alpha frog.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: excel value to word bookmark - macro to keep formatting

    You're welcome. Thanks for the feedback.

+ 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. Export image from Excel to Word bookmark
    By littlecabbage336 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2015, 01:49 PM
  2. Vba Excel to word; deleting all text from last bookmark to end of document
    By julhs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-19-2014, 04:52 PM
  3. add additional data to word document's bookmark in excel
    By RonNCmale in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-06-2011, 04:14 PM
  4. importing text from bookmark in Word to excel
    By mayanklal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2006, 10:23 AM
  5. hyperlink from Excel to a Word bookmark
    By Bertie in forum Excel General
    Replies: 2
    Last Post: 05-16-2006, 02:55 PM
  6. [SOLVED] How to copy cells excel data and paste them under MS Word bookmark
    By Bon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2006, 11:40 AM
  7. Replies: 0
    Last Post: 01-11-2006, 02:00 PM

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