longtallsunny
New Member
- Joined
- Mar 10, 2021
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
I have created a spreadsheet where each column matches a [variable] in a Word document. Using VBA, I replace the [variable] in the Word document with the contents of the cell in the active row. It works beautifully EXCEPT when I copy a string of text from another document (pdf or doc). To be specific, my worksheet has several variables, two of which are [shorttitle] and [longtitle]. My Word document says "Protocol: {shorttitle]: [longtitle]" When I enter data into my Excel worksheet, I usually copy and paste from another document. When I run my macro, my Word document will say "Protocol: SHORT TITLE I ENTERED: " So there is nothing for [longtitle]. HOWEVER, if I key in the long title myself, it will show up. Furthermore, if I copy the long title from a different cell in Excel it will show up. The cell format is General, which is what every other cell is. To muddy it even further, I copy and paste the [shorttitle] from another document and have no issues. Does this make sense? Anyone have a clue how to fix this?