Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2023, 10:40 AM
vivka vivka is offline Add filename to imported text Windows 7 64bit Add filename to imported text Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi, try replacing
wdDoc.range.InsertAfter rtfFile.range.text & vbCr


with:
wdDoc.range.InsertAfter strFile & vbCr & rtfFile.range.text & vbCr
Reply With Quote
  #2  
Old 09-14-2023, 01:56 PM
knpaddac knpaddac is offline Add filename to imported text Windows 10 Add filename to imported text Office 2016
Novice
Add filename to imported text
 
Join Date: Jan 2018
Posts: 13
knpaddac is on a distinguished road
Default

had to change the single instance of 'strFile' to 'rtfFile' but that did the trick.



Quote:
Originally Posted by vivka View Post
Hi, try replacing
wdDoc.range.InsertAfter rtfFile.range.text & vbCr
with:
wdDoc.range.InsertAfter strFile & vbCr & rtfFile.range.text & vbCr
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add filename to imported text formatting of imported text philh Word 4 03-23-2020 02:56 PM
Add filename to imported text Convert Imported picture to text Baldeagle Excel Programming 2 03-23-2019 01:51 PM
filename field not displaying correct filename when that name starts with # plrsmith Word 1 07-06-2018 03:10 AM
How to merge text boxes in a large imported document boatfly Word 3 04-20-2016 06:15 AM
Add filename to imported text Save Filename using Document Text Knawl Word 11 10-10-2011 03:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft