Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2021, 07:27 AM
chrscote chrscote is offline Trying to copy text from HTML file into Word using VBA Windows 7 64bit Trying to copy text from HTML file into Word using VBA Office 2010 64bit
Novice
Trying to copy text from HTML file into Word using VBA
 
Join Date: Aug 2016
Posts: 12
chrscote is on a distinguished road
Exclamation Trying to copy text from HTML file into Word using VBA

I have a script that creates an HTML page on the desktop containing just text with break tags and some bolded text only. It does not contain any tables. What I'd like to do is copy the text that is in the HTML page using a .docm file, that contains fields for date and baseline, with a VBA script. I've been searching a bunch of forums, but they all have text in tables. How do I take the simple text with bold from the HTML page on the desktop and paste it into the docm file and save it with a specific name?




Chris
Reply With Quote
  #2  
Old 06-24-2021, 03:45 PM
Guessed's Avatar
Guessed Guessed is offline Trying to copy text from HTML file into Word using VBA Windows 10 Trying to copy text from HTML file into Word using VBA Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I would expect something like this to work for the html insert
Code:
Selection.InsertFile FileName:="C:\Test.htm", Range:="", ConfirmConversions:=False, Link:=False, Attachment:=False
For the Save line, record a macro while you do a SaveAs and see what the result is.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
saving html as doc

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to copy text from HTML file into Word using VBA How to copy and paste text from inside an (html) form in word tfn Word 1 01-17-2017 01:49 PM
How to create e-mail from text/HTML file jimcant Outlook 0 07-18-2013 05:50 AM
Expand/Collapse in Html Word File kitkat0910 Word 0 10-10-2012 03:42 AM
Trying to copy text from HTML file into Word using VBA Import HTML into Word .doc file? Clueless in Seattle Word 1 07-31-2012 12:12 PM
Help! Find text in doc file & copy to another file northstarman Word 1 11-05-2010 08:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:20 AM.


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