PDA

View Full Version : Word Tests. Useful older stuff. Older versions. Chris stuff etc



DocAElstein
07-03-2019, 01:23 PM
Some notes and tests in support of possible answer to this Thread:
http://www.excelfox.com/forum/showthread.php/2347-what-is-the-best-way-to-populate-word-specific-locations-from-Excel-Data
Related also to these posts:
https://tinyurl.com/y3j3klvo
https://tinyurl.com/y5n4x7ku
https://tinyurl.com/y4av8rer
https://tinyurl.com/y4b34a9g




Code to make Day list from Excel File and show in Pop up Word .htm File.
MakeTagList Button , Sub MakeTagList()
This post gives some Overview notes for later reference to help clarify some other more detailed excelfox Threads.

MakeTagList Button. Briefly, overview:
The code Sub MakeTagList(), primarily does two things:
_ makes a simple text file with the important details from a Daily Diet Protocol
DailyTextFileForEmailAttatchment.JPG : https://imgur.com/MqEmlDF
2053

_ makes a long string of HTML coding which if written to a text file, (but with the usually given .txt extension replaced with .htm ), is recognised by Microsoft Word which can open it in a form which looks similar to a normal Word doc
That Word File is opened temporarily to show a pretty table form of the important details from a Daily Diet Protocol:
TemporaryWordPopUp.JPG : https://imgur.com/ZFhsdaQ
2054

_.___________



_ makes a simple text file with the important details from a Daily Diet Protocol
arrNuts()
The start point is that an array is made of used food products from daily pro, arrNuts()
arrNuts() is the = Items() array from a Dictionary. So it is a one dimension array starting at arrNuts(0). Each Element is a row from the from the Daily Excel Diet Protocol File, "ProAktuellex8600x2.xlsm". It is built up from a line like pseudo

Key:=ProRow with Entry in C column, Item:=Array(FoodProduct in 1st Column A , amount eaten from 3rd Column C , Kcal total in 9th column I , Fett , Eiweiß …. Etc.
( The Key is not used currently )

Rem 5 Text File
A text file is made from the array with a pipe, _ | _ , as separator like from:
arrNuts(0)(0) & "|" & arrNuts(0)(1) & "|" & arrNuts(0)(2) ……..etc..
arrNuts(1)(0) & "|" & arrNuts(1)(1) & "|" & arrNuts(1)(2) ……..etc..
arrNuts(2)(0) & …..etc..
The final text file is stored in the same Folder as most of the files to do with daily protocols, that is to say, the currently used main Folder . It is given a name something of the form pseudo
"MonatsUebersichtAnhang " & Date in format like "mmmm yyyy" & ".txt"
As example for any day in April, 2018, it will be like
"MonatsUebersichtAnhang April 2018.txt"
The main purpose of this text file is to have a file that can be attached to an Email which at the receiving end can then be for recording and using the important daily nutrition values in a graphic
I use the standard VBA type code lines for this , pseudo like
Open C: \ __ \ _ \ ¬¬¬-___"MonatsUebersichtAnhang April 2018.txt" For __ As __
_.___________

_ makes a long string of HTML coding which if written to a text file, (but with the usually given .txt extension replaced with .htm ), is recognised by Microsoft Word and can opens it in a form which looks similar to a normal Word doc
Rem 6 .htm Word Template File
An empty or almost empty .htm Word file, "DailyProtable.htm " , ( which should be in the main currently used Folder already , - ( download from box if necessary ) ) is converted into a single very long String variable , TotalFile
I use the fairly standard VBA way often used to get this long string from a .txt file. It seems to work equally well for a .htm file

Rem 6 get Template File as long HTML string . Template file is an almost empty Word .htm file.
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName As String, TotalFile As String
Let PathAndFileName = ThisWorkbook.Path & "\" & "DailyProtable.htm" ' Template file never changes
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
TotalFile = Space(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
Get #FileNum, , TotalFile
Close #FileNum
Rem 7 modify main body text section of the template file

Rem 7
Things start getting a bit complicated now. It may help at this point to give a summary of the overall goal:
The final aim of this code and the associated code usually done just after, Sub PetrasDailyProWay1_COM_Way() , is to get a pretty summary table in a HTML code such as it is in a form that can be used for two things:
_ Temporarily in a Word .htm file which is opened temporarily to show the current stand of a finished or almost finished protocol,
_ part of that ( the main body part ) can be isolated into a functioning variable , MyLengthyStreaming , and used in the typical LECMO (http://www.excelfox.com/forum/showthread.php/2240-VBA-referring-to-external-shared-Libraries-1)-Early-1-5)-Laterly-Early-and-2)-Late-Binding-Techniques) technology code lines of the form
CDO.Message.HTMLBody = MyLengthyStreaming
CDO.Message.Send
( In actual fact the entire Word.htm HTML string, TotalFile , could usually be used, but I do not do this as
_ TotalFile has a lot of unnecessary text, presumably needed for Word .htm file recognition
as well as
_ there are some subtle problems which need to be addresses with the string before it can be used with German Telekom, as it appears that a Bug means that the German Telekom does not quite recognise correctly that standard HTML coding ( gmail and AOL seem not to have this problem ) https://telekomhilft.telekom.de/t5/E-Mail-Center/Text-Formatieren-behalten-von-Word-wenn-Einfuegen-in-Telekom-E/m-p/3136416#M129791 )

What basically needs to be done is to modify the TotalFile at the main body part. This Part of the text is almost empty at this stage. That almost empty main body part is replaced by a made pretty HTML table
It is all done in a bit of a messy way, and it is easy to lose track of what is going on. Once again, the purpose of this code:
The code Sub MakeTagList(), primarily
_ makes a simple text file with the important details from a Daily Diet Protocol
_ makes a long string of HTML coding which if written to a text file, (but with the usually given .txt extension replaced with .htm ), is recognised by Microsoft Word and can opens it in a form which looks similar to a normal Word doc


_ makes a long string of HTML coding which if written to a text file, (but with the usually given .txt extension replaced with .htm ), is recognised by Microsoft Word and can opens it in a form which looks similar to a normal Word doc
In Rem 7 we basically embed a Table ( in HTML coding form ) by doing a simple Replace of the start part of the main body in the string from the Template .htm file which looks like this
<div class=WordSection1> ( You can see that yourself if you open up the .htm file using a simple text editor, and look towards the end MainWordSectionBody.JPG : https://imgur.com/HWjHTyz )
That existing HTML coding, <div class=WordSection1> , is Replaced by
<div class=WordSection1> & A made HTML table done in a Function
That Function is called using the arrNuts() thus:
ProTble(arrNuts())

Function ProTble()
By a bit of trial and error and learning some basic HTML coding I was able to write this function which based on the data given in arrNuts() gives a lot of HTML coding which a Browser ( or Word when it has it included in the long HTML string opened using a .htm extension file ) can understand and produce a table formatted as I want:

Rem 8
Back in the main code we now have our original full file text string of HTML coding, TotalFile , modified to include in it the pretty table
The string is printed out to a text file in the usually way but with the .htm extension instead of the usual .txt extension. This file is currently given the name
"DailyProtableFilled.htm"

Rem 8 Over write the last ( likely yesterdays ) filled file, with the modified template file which is mainly still that what Word recognises as we only modified a bit of the main text body
Dim HighwayToHelloPro As Long ' For rewrite of modified DailyProtable.htm as DailyProtable.htm2
Let HighwayToHelloPro = FreeFile(0)
Open ThisWorkbook.Path & "\" & "DailyProtableFilled.htm" For Output As #HighwayToHelloPro ' Will be made if not there, and overwritten as Output rahter than Append
Print #HighwayToHelloPro, TotalFile
Close #HighwayToHelloPro
Rem 9 get Word using Excel

Rem 9
The final part of the code, Sub MakeTagList() , which is initiated by the Button, MakeTagList , brings up the file, "DailyProtableFilled.htm" , temporarily in Microsoft Word.

_.___________

Required Files:
Daily Diet Protocol :
"ProAktuellex8600x2.xlsm" :
https://app.box.com/s/fpztob9pcp92fl6hh81zgpzumw9ntcp0 ( Current )
https://www.magentacloud.de/share/38m-zuc2y3#$/ ( April 2018 )

Main Makro File:
"NeuProAktuelleMakros.xlsm" :
https://app.box.com/s/e93u19xidygreeeenlxyupm750dxe33f ( Current )
https://www.magentacloud.de/share/38m-zuc2y3#$/ ( April 2018 )

Usually in practical use, the execution of the last coding would be followed by the sending of the EMail using the Send Pro Mail Button.



https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)




Ref:
http://www.eileenslounge.com/viewtopic.php?f=27&t=29556#p228710
http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=10528#post10528




https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
07-04-2019, 03:41 PM
Coding in support of this Thread
http://www.excelfox.com/forum/showthread.php/2347-what-is-the-best-way-to-populate-word-specific-locations-from-Excel-Data?p=11384#post11384




Option Explicit
'Sub LateEarlyBinding()
' On Error Resume Next ' If it is always there you get Name steht in Konflikt mit vorhandenem Modul, Projekt oder vorhandener Objektbibliothek RuntimeError32813.JPG : https://imgur.com/N0BN7m2 If it is not there then usually it does not error, but will in Debug F8 mode Change to the hold mode is not possible at this time.JPG : https://imgur.com/v9inlwM but it works anyway and ignores the error handler in this case
' ThisWorkbook.VBProject.References.AddFromguid GUID:="{420B2830-E718-11CF-893D-00A0C9054228}", major:=1, Minor:=0
' Debug.Print Err.Description
' On Error GoTo 0 ' Clears exception and the Err.Description also is cleared
'End Sub
Sub MakeTagList() ' A Table is made and embedded in the main body text of an existing .htm Word readable file which must already exist and be in the same folder as this workbook. That is set to pop up in word briefly. (The main body of the htm file can then used later as the .HTMLBody in an email )
' Call LateEarlyBinding ' Microsoft Scripting Runtime
Rem 4 Array from range
Dim arrNuts() As Variant: Let arrNuts() = ThisWorkbook.Worksheets.Item(1).Range("A2:B3").Value
Rem 6 get Template File as long HTML string . Template file is an almost empty Word .htm file with just "I would like to put here Table1. Here is some other text" .
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName As String, TotalFile As String
Let PathAndFileName = ThisWorkbook.Path & "\" & "WordFile.htm" ' Template file never changes
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
TotalFile = Space(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
Get #FileNum, , TotalFile
Close #FileNum
Debug.Print TotalFile
Rem 7 modify main body text section of the template file
'7a) Start bit, and call of HTML table genarator Function
Dim MyLengthyStreaming As String
Let MyLengthyStreaming = "<p></p><p></p>" & MyLengthyStreaming & ProTble(arrNuts())
Let TotalFile = Replace(TotalFile, "Table:_1.<o:p></o:p></span></i></p>", "Table:_1.<o:p></o:p></span></i></p>" & vbCrLf & MyLengthyStreaming, 1, 1, vbTextCompare)
'7b) anything after table
Dim sT As String, aFt As String: Let sT = "Bit after table to aid in adding stuff in main code" ' This string was put on the end od the final HTML table so as to have a thing to replace with something like the end of th table
Let aFt = "<p>" & ThisWorkbook.Worksheets.Item(1).Range("A1").Value & "</p><p>.</p>" ' Put table Header under table
' Let aFt = "<p><span style=""color: #ff00ff;"">'_---Table made " & Format(Now(), "DD MMMM YYYY") & " " & Now() & " ====Daily Foods Table End ======</span></p>"
Let TotalFile = Replace(TotalFile, sT, aFt, 1, 1, vbBinaryCompare)
' Debug.Print TotalFile
Rem 8 Make new file with modified long HTML string
Dim HighwayToHelloPro As Long ' For rewrite of modified DailyProtable.htm as DailyProtable.htm2
Let HighwayToHelloPro = FreeFile(0)
Open ThisWorkbook.Path & "\" & "WordFile2.htm" For Output As #HighwayToHelloPro ' Will be made if not there, and overwritten as Output rahter than Append
Print #HighwayToHelloPro, TotalFile
Close #HighwayToHelloPro
Rem 9 get Word using Excel
Dim appWord As Object ' Dim appWord As Word.Application
Set appWord = CreateObject("Word.Application") ' Set appWord = New Word.Application '
appWord.Visible = True
appWord.Documents.Open Filename:=ThisWorkbook.Path & "\" & "WordFile2.htm", ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", Format:=0, XMLTransform:="", DocumentDirection:=0
appWord.Documents("WordFile2.htm").Activate
Application.WindowState = xlMinimized
Application.OnTime Now + TimeSerial(0, 0, 5), "Modul1.GetWordObjClose"
'9b) Some Word Formatting
'Windows("ProAktuellex8600x211.3.xlsm").Activate
'Dim docMsg As Document '
' Set docMsg = ActiveDocument ' Documents("DailyProtableFilled")
' docMsg.Range(0, 100).Select
' Selection.WholeStory
' With Selection.ParagraphFormat
' .SpaceBeforeAuto = False
' .SpaceAfterAuto = False
' End With
End Sub
Sub GetWordObjClose() ' Close the daily pro in word
Application.WindowState = xlNormal
Dim appWord As Object ' Dim appWord As Word.Application
Set appWord = GetObject(, "Word.Application"): appWord.Visible = True ' This will open new instance of word and make it visible ( with no document). If one is open then it will be set to the appWord variable
Dim Dock As Variant
For Each Dock In appWord.Documents
Dock.Save
Dock.Close
Next Dock
' appWord.ActiveDocument.Save
' appWord.ActiveDocument.Close
appWord.Quit
Application.WindowState = xlNormal
'Application.Windows("" & ProWb.Name & "").Activate
'Application.Windows("" & ProWb.Name & "").WindowState = xlNormal
'ActiveWindow.WindowState = xlNormal
End Sub
Function ProTble(ByRef arrNuts() As Variant) As String
' Table start
Let ProTble = _
"<table width=800" & vbCrLf & _
"<col width=400" & vbCrLf & _
"<col width=400>" & vbCrLf & vbCrLf
Dim iCnt As Long, jCnt As Long ' data "rows" , "columns"
For jCnt = 1 To UBound(arrNuts(), 1)
Dim LisRoe As String
Let LisRoe = LisRoe & "<tr height=16>" & vbCrLf
For iCnt = 1 To UBound(arrNuts(), 2)
Let LisRoe = LisRoe & "<td>" & arrNuts(jCnt, iCnt) & "</td>" & vbCrLf
Next iCnt
Let LisRoe = LisRoe & "</tr>" & vbCrLf & vbCrLf
Let ProTble = ProTble & LisRoe
Let LisRoe = ""
Next jCnt
Let ProTble = ProTble & "</table>" ' table end
' Bit after table to aid in adding stuff in main code
Let ProTble = ProTble & "Bit after table to aid in adding stuff in main code"
End Function







"WordFile.htm" : https://app.box.com/s/xl1l7noo2nf7znnzyz6evqaeiuu37gcz



https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9iHOYYpaA bC (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9iHOYYpaA bC)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgxuL6YCUckeUIh9hoh4AaABAg (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgxuL6YCUckeUIh9hoh4AaABAg)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7G-bVm8_- (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7G-bVm8_-)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7EqbG23kg (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7EqbG23kg)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7KvJXmK 8o (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwGTEyefOX7msIh1wZ4AaABAg.9h4sd6Vs4qE9h7KvJXmK 8o)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7E1gwg4Aq (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=Ugw3nF0C04AGt73H1BB4AaABAg.9h6VhNCM-DZ9h7E1gwg4Aq)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgywFtBEpkHDuK55r214AaABAg (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgywFtBEpkHDuK55r214AaABAg)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79hNGvJ bu (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79hNGvJ bu)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79YAfa2 4T (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79YAfa2 4T)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79M1SYH 1E (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h79M1SYH 1E)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78SxhXT nR (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78SxhXT nR)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
12-20-2020, 02:13 PM
Get the Color shade you want to come out in Final Post

I expect there is a better way to do this, but I just hit on a way that works quite well, so I will document and share that now , and edit and update later if I come up with a more scientific and/ or automated way.

As an example , say I have seen this: _ shade _ somewhere, as you see it here, ( there ) . Lets assume I want to post that word in a Forum editor which accepts BB Code tags, ( BB Code tags: http://www.excelfox.com/forum/misc.php?do=bbcode ) such that I get that _ shade _ in the final post just as you see it here ( there )

Here is a way to do it:
_1 ) Use Word to get the shade of shade that you want,
:rolleyes: :for example,
_ 1A) highlight any text and experiment with its color:
Word Text Color 0.JPG : https://imgur.com/xpCoo8B
Word Text Color 1 2.JPG : https://imgur.com/agdUo2f
Word Text Color 3.JPG : https://imgur.com/H5czlGV
Word Text Color 4.JPG : https://imgur.com/2ff71Xq
( Hit OK when finished to change selection color)
1981198219831984

_ 1B) As an alternative start point, you can find any text color anywhere, for example in the internet, paste into Word and adjust it in Word as per _ 1A)

_2 ) Copy the final Text to the clipboard.
Search the internet for any Word to HTML converter, there are many free ones available. Typically you can paste anything into a Visual Editor and then choose to obtain the HTML code
WordVisualToHTML.JPG : https://imgur.com/T19SMxG
1980

_3 ) In the given HTML code will typically be some part referring to the text shade,_..

<p><span style="font-size: 11pt; line-height: 115%; font-family: Verdana, sans-serif; color: #417394;">shade</span></p>
_.. here for example, the number of interest is _ color: #417394

_4 ) I assume the number used in the square bracket [ BB Code Color Tags ] pair is the same as in pointy bracket < HTML > code Tags color bit. It appears to be.
So for our example shade you would use this in a forum post_..
____ shade
_.. which would come out like this:
__________________ shade

( If you want to keep the indent, as I did here (there), and avoid the forum editor “eating” spaces of more than one, ( as most forum editors do this ) ) , then use the white character trick: Post something like this:
_ Any_White_Profanity Text shade




Alan

DocAElstein

DocAElstein
https://imgur.com/MKMjW0b



Ref
http://www.excelfox.com/forum/showthread.php/2057-Code-Mod-to-prevent-further-Replacement-Text-over-complete-Document
https://imgur.com/MKMjW0b
http://www.excelfox.com/forum/misc.php?do=bbcode
https://wordtohtml.net/
http://services.runescape.com/m=forum/forums.ws?278,279,877,64690220
http://www.excelfox.com/forum/showthread.php/2146-%E0%A4%AC%E0%A5%8D%E0%A4%B2%E0%A5%89%E0%A4%97-%E0%A4%95%E0%A5%8B%E0%A4%B6%E0%A4%BF%E0%A4%B6-%E0%A4%95%E0%A4%B0-%E0%A4%B0%E0%A4%B9%E0%A4%BE-%E0%A4%B9%E0%A5%88-%D8%A8%D9%84%D8%A7%DA%AF%D8%B2-%DA%A9%DB%8C-%DA%A9*Trying-Blogs/page2#post10131

DocAElstein
09-10-2021, 01:48 PM
spare post for later use



https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78GftO_ iE (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgwviLabd7r_3KpP6wh4AaABAg.9h5lFRmix1R9h78GftO_ iE)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h77HSGDH 4A (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h77HSGDH 4A)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h76fafzc EJ (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h76fafzc EJ)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h759YIjl aG (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h759YIjl aG)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h74pjGcb Eq (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg.9h740K6COOA9h74pjGcb Eq)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgyG714V_k7odQMrTz14AaABAg)
https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgzJJUDVv2Mb6YGkPYh4AaABAg.9h5uPRbWIZl9h7165DZd jg (https://www.youtube.com/watch?v=2oT4qrHmDMY&lc=UgzJJUDVv2Mb6YGkPYh4AaABAg.9h5uPRbWIZl9h7165DZd jg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ)
https://www.youtube.com/watch?v=jdPeMPT98QU (https://www.youtube.com/watch?v=jdPeMPT98QU)
https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg (https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
09-10-2021, 01:48 PM
Some notes in support of this Thread: https://excelfox.com/forum/showthread.php/2761-Get-Pictures-from-Word-Documents-in-All-Sub-Folders?p=15623&viewfull=1#post15623


Compare an empty Word document with a Word document with some arbitrary text, when both are saved in the .htm format.

To help with later programming, I will run the macro recorder while making the two files.
So this is a walk through it…
_ Start the macro recorder
_ make a new file
_ save it as docHTML1.htm
_ close it

_ make a new file
_ add the text some arbitrary text
¬_ save it as docHTML2.htm
_ close it

This is the basic macro produced by recorder. ( I changed/ rearranged a few things and added a few 'comments, but it is the same basic coding

Sub Makro5()
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0 ' _ make a new file
ActiveDocument.SaveAs Filename:="docHTML1.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False ' _ save it as docHTML1.htm
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' _ close it

Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0 ' _ make a new file
Selection.TypeText Text:="some arbritrary text" ' _ add the text some arbitrary text
ActiveDocument.SaveAs Filename:="docHTML2.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False ' _ save it as docHTML2.htm
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' _ close it
End Sub

This is what I see appear as a result of doing the above:
Two htm files and other stuff appeared.JPG
https://i.postimg.cc/0rF47qYk/Two-htm-files-and-other-stuff-appeared.jpg (https://postimg.cc/0rF47qYk)
https://i.postimg.cc/pmmzzpHr/Two-htm-files-and-other-stuff-appeared.jpg (https://postimg.cc/pmmzzpHr)

If I now open those two htm files with a text editor, I see this ( I am only showing the last bits below as there is more than the post limit allows )
docHTML1.htm: https://app.box.com/s/l16u4vxavd8kjd1lzo3arb97rw4yoww1

mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:35.4pt'>

<div class=WordSection1>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>


docHTML2.htm: https://app.box.com/s/quzanrhoopgdyzvk9dc5cbj9y0quuk4x

font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:35.4pt'>

<div class=WordSection1>

<p class=MsoNormal><span class=SpellE>some</span> <span class=SpellE>arbritrary</span>
text</p>

</div>

</body>

</html>


What is going on there is that the lot of complicated html stuff ( of which I only show a bit ) is how a simple Microsoft Word document looks like if written in html. So for example, if you wanted to view your word document using an internet browser, then you would give the browser something like that. You can actually try that:
View htm file in browser.JPG
https://i.postimg.cc/c6VS0zLz/View-htm-file-in-browser.jpg (https://postimg.cc/c6VS0zLz)



Here for comparison is a file I used to give some summary in a Word doco. This is the file without yet any info in it, ( as a text file )
DailyProtable.txt : https://app.box.com/s/q0tyxq8qptdb50oxxxtplbf9ur3xaeu2

</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="4098"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:35.4pt'>

<div class=WordSection1>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><b><span style='color:#D99594;mso-themecolor:accent2;
mso-themetint:153'>X <span class=SpellE>x</span> <span class=SpellE>x</span> <span
class=SpellE>x</span> <span class=SpellE>x</span> <o:p></o:p></span></b></p>

</div>

</body>

</html>


This is the same file again with the information filled in it:
DailyProtableFilled.txt : https://app.box.com/s/l16u4vxavd8kjd1lzo3arb97rw4yoww1

<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:1;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:variable;
mso-font-signature:0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1073750139 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Arial;
mso-bidi-theme-font:minor-bidi;
mso-fareast-language:EN-US;}
@page WordSection1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Normale Tabelle";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="4098"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:35.4pt'>

<div class=WordSection1>
<p><span style="color: #ff00ff;">'_-Start=========== 02 April 2018 02.04.2018 21:55:52 ------------------------------------</span></p><table width=800
<col width=200
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<col width=50>
<tr height=17>
<td>Food Product</td>
<td>g</td>
<td>Kcal</td>
<td style="color:red;background:#F2DDDC">Fett</td>
<td style="color:blue;background:#DBE5F1">Protein</td>
<td style="background:#D8D8D8">Koh</td>
<td style="color:silver;background:#D8D8D8">Zucker</td>
<td style="color:brown;background:#DDD9C3">Ballastoffe</td>
<td style="color:green;background:#EAF1DD">Wasser</td>
<td style="color:purple;background:#E5E0EC">kalium</td>
<td style="background:#DBEEF3">Natrium+</td>
</tr><tr height=17>
<td>NescafeEntkoffinieret</td>
<td>14g</td>
<td>16.52</td>
<td style="color:red;background:#F2DDDC">0.028</td>
<td style="color:blue;background:#DBE5F1">1.092</td>
<td style="background:#D8D8D8">0.434</td>
<td style="color:silver;background:#D8D8D8">0.434</td>
<td style="color:brown;background:#DDD9C3">4.774</td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3">0.014</td>
</tr>
<tr height=17>
<td>G&GSuessstoffTabletten</td>
<td>0.2g</td>
<td>0.04</td>
<td style="color:red;background:#F2DDDC"></td>
<td style="color:blue;background:#DBE5F1"></td>
<td style="background:#D8D8D8">0</td>
<td style="color:silver;background:#D8D8D8">0</td>
<td style="color:brown;background:#DDD9C3">0</td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3">0.0274</td>
</tr>
<tr height=17>
<td>SuessliStevia(Flussig)</td>
<td>0.2g</td>
<td>0.001</td>
<td style="color:red;background:#F2DDDC"></td>
<td style="color:blue;background:#DBE5F1"></td>
<td style="background:#D8D8D8"></td>
<td style="color:silver;background:#D8D8D8"></td>
<td style="color:brown;background:#DDD9C3"></td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3"></td>
</tr>
<tr height=17 style="color:darkblue;background:pink">
<td>Pro For Montag 02 April 02 04 2018</td>
<td>14.4g</td>
<td style="color:orange;background:white;height:21">17Kcal</td>
<td style="color:red;background:white">0.028</td>
<td style="color:blue;background:white">1.092</td>
<td style="background:white">0.434</td>
<td style="color:silver;background:white">0.434</td>
<td style="color:brown;background:white">4.774</td>
<td style="color:green;background:white"></td>
<td style="color:purple;background:white"></td>
<td style="background:white">0.041</td>
</tr>
<tr height=17 style="color:darkblue;background:pink">
<td>Main Foods</td>
<td>14.4g</td>
<td>16.561</td>
<td style="color:red;background:#F2DDDC">0.028</td>
<td style="color:blue;background:#DBE5F1">1.092</td>
<td style="background:#D8D8D8">0.434</td>
<td style="color:silver;background:#D8D8D8">0.434</td>
<td style="color:brown;background:#DDD9C3">4.774</td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3">0.0414</td>
</tr>
<tr height=17>
<td>Fruit</td>
<td>0g</td>
<td></td>
<td style="color:red;background:#F2DDDC"></td>
<td style="color:blue;background:#DBE5F1"></td>
<td style="background:#D8D8D8"></td>
<td style="color:silver;background:#D8D8D8"></td>
<td style="color:brown;background:#DDD9C3"></td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3"></td>
</tr>
<tr height=17>
<td>Veg</td>
<td>0g</td>
<td></td>
<td style="color:red;background:#F2DDDC"></td>
<td style="color:blue;background:#DBE5F1"></td>
<td style="background:#D8D8D8"></td>
<td style="color:silver;background:#D8D8D8"></td>
<td style="color:brown;background:#DDD9C3"></td>
<td style="color:green;background:#EAF1DD"></td>
<td style="color:purple;background:#E5E0EC"></td>
<td style="background:#DBEEF3"></td>
</tr>
</table><p><span style="color: #ff00ff;">'_---Table made 02 April 2018 02.04.2018 21:55:52 ====Daily Foods Table End ======</span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><b><span style='color:#D99594;mso-themecolor:accent2;
mso-themetint:153'>X <span class=SpellE>x</span> <span class=SpellE>x</span> <span
class=SpellE>x</span> <span class=SpellE>x</span> <o:p></o:p></span></b></p>

</div>

</body>

</html>

Just for my memory revision , in the macro I use ( e.g. xxxxx ) , this is the code line which adds my stuff ( which I have in a variable, MyLengthyStreaming ) so as to make DailyProtableFilled from DailyProtable


Let TotalFile = Replace(TotalFile, "<div class=WordSection1>", "<div class=WordSection1>" & vbCrLf & MyLengthyStreaming, 1, 1, vbTextCompare)

So we see what is going on – we are adding stuff at the word section.
Lets take a look now at the OP’s file …. In next post

DocAElstein
09-11-2021, 03:27 PM
_...continued from last post
Lets take a look now at the OP’s file


I will open it, save it as extension type .htm at some temporary place, close it, and then take a look at the .htm file produced with a text editor.
( Once again I will run a macro recording so as to get some coding for future reference )

This is the basic coding produced:

Sub Makro6()
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\"
Documents.Open Filename:="""2. KEEP DUPLICATE RECORDS.docx""", ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:="", DocumentDirection:=wdLeftToRight

ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Temp orary Folder\"
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close
End Sub

Here is a look at part of the htm file
2. KEEP DUPLICATE RECORDS.txt : https://app.box.com/s/7ezpcmytjctxvqdodosys62nsdn80y45
_... see next post

DocAElstein
09-11-2021, 04:07 PM
_... continued


</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:36.0pt'>

<div class=WordSection1>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;mso-outline-level:2;background:white;vertical-align:
baseline'><b><span lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>2. Keep Duplicate Records<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><u><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>Power Query</span></u><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'> lets you perform a series of steps
to transform your Excel data.<span style='mso-spacerun:yes'> </span>One of the
steps it allows you to take is to<b> keep duplicate records</b>.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>We usually remove duplicate lines
but if we need to keep and check what the duplicates are, Excel allows us to do
that too!<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>Let’s suppose you have this set of
data. You can see that the marked ones are duplicate values, let us keep them!<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:DE;mso-fareast-language:DE;mso-no-proof:
yes'><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_38" o:spid="_x0000_i1030" type="#_x0000_t75"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" style='width:122.25pt;
height:121.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image001.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=163 height=162
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image002.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_38"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><b><u><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>STEP 1</span></u></b><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>: Select your data and turn it into
an Excel Table by pressing the shortcut <b>Ctrl + T </b>or by going to<b>
Insert &gt; Table</b><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:DE;mso-fareast-language:DE;mso-no-proof:
yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_39" o:spid="_x0000_i1029"
type="#_x0000_t75" alt="Keep Duplicates Using Power Query or Get &amp; Transform"
style='width:105pt;height:132pt;visibility:visible ;mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image003.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=140 height=176
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image004.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_39"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><b><u><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>STEP 2</span></u></b><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>: Go to <b><i>Power Query &gt; Excel
Data &gt; From Table</i>:</b><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><a
name="_GoBack"></a><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";mso-ansi-language:DE;mso-fareast-language:
DE;mso-no-proof:yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_41" o:spid="_x0000_i1028"
type="#_x0000_t75" alt="Keep Duplicates Using Power Query or Get &amp; Transform"
style='width:291pt;height:48pt;visibility:visible; mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image005.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=388 height=64
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image006.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_41"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><b><u><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>STEP 3: </span></u></b><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>This will open up the Power Query
Editor.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>Go to <b><i>Home &gt; Keep Rows &gt;
Keep Duplicates</i></b><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:DE;mso-fareast-language:DE;mso-no-proof:
yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_42" o:spid="_x0000_i1027"
type="#_x0000_t75" alt="Keep Duplicates Using Power Query or Get &amp; Transform"
style='width:198pt;height:163.5pt;visibility:visib le;mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image007.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=264 height=218
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image008.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_42"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><b><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>STEP 4: </span></b><span lang=EN-US
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman"'>Click <b>Close &amp; Load</b> from the <b>Home</b> tab and
this will <b>open up a brand new worksheet</b> in your Excel workbook with the
updated table.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:DE;mso-fareast-language:DE;mso-no-proof:
yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_43" o:spid="_x0000_i1026"
type="#_x0000_t75" alt="Keep Duplicates Using Power Query or Get &amp; Transform"
style='width:115.5pt;height:126.75pt;visibility:vi sible;mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image009.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=154 height=169
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image010.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_43"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>You now have your new table with the
duplicate rows kept!<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:0cm;margin-bottom:.0001pt;text-align:
justify;line-height:normal;background:white;vertical-align:baseline'><span
style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:DE;mso-fareast-language:DE;mso-no-proof:
yes'><!--[if gte vml 1]><v:shape id="Picture_x0020_44" o:spid="_x0000_i1025"
type="#_x0000_t75" alt="Keep Duplicates Using Power Query or Get &amp; Transform"
style='width:89.25pt;height:70.5pt;visibility:visi ble;mso-wrap-style:square'>
<v:imagedata src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image011.png"
o:title="Keep Duplicates Using Power Query or Get &amp; Transform"/>
</v:shape><![endif]--><![if !vml]><img width=119 height=94
src="2.%20KEEP%20DUPLICATE%20RECORDS-Dateien/image012.jpg"
alt="Keep Duplicates Using Power Query or Get &amp; Transform" v:shapes="Picture_x0020_44"><![endif]></span><span
lang=EN-US style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>

These are the files and folders produced Files and Folders from OPs file saved as htm.jpg
https://i.postimg.cc/sGFkH5ZX/Files-and-Folders-from-OPs-file-saved-as-htm.jpg (https://postimg.cc/sGFkH5ZX)

Here is the actual file as seen in word
OPs sample file.JPG
https://i.postimg.cc/1g1hpq8f/OPs-sample-file.jpg (https://postimg.cc/1g1hpq8f)

And it might be interesting to see the OPs file seen in the text format, if I delete all that stuff seen , making a new file, 2. KEEP DUPLICATE RECORDS All stuff removed.htm
OPs sample file All stuff removed.jpg
https://i.postimg.cc/jn2dG7QR/OPs-sample-file-All-stuff-removed.jpg (https://postimg.cc/jn2dG7QR)

This is what that file looks like in the text format view:

mso-ansi-language:EN-US;
mso-fareast-language:EN-US;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="5122"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body lang=DE style='tab-interval:36.0pt'>

<div class=WordSection1>

<p class=MsoNormal><span style='mso-ansi-language:DE'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>

2. KEEP DUPLICATE RECORDS All stuff removed.txt: https://app.box.com/s/f00nejo3edwygrz6jq3u8zvny7ceakp7

DocAElstein
09-14-2021, 11:19 AM
The HTML text of the content – our stuff as seen in HTML coiding.
The last few postings seem to tell us that the content we are interested in, that is to say what we put in the document seems to lie in between the HTML text of
<div class=WordSection1>
And something of the form
<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

</div>

Or
<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><b><span style='color:#D99594;mso-themecolor:accent2;
mso-themetint:153'>X <span class=SpellE>x</span> <span class=SpellE>x</span> <span
class=SpellE>x</span> <span class=SpellE>x</span> <o:p></o:p></span></b></p>

</div>
The end point might not be too clear, but if we take all the text from <div class=WordSection1> to </div> then it looks like we will catch all of “our stuff”

In that text of our stuff we see 6 bits with a .jpg and 6 bits with .png
Comparing that with the typical files produced .._
_.. , and considering that the document has clearly 6 images.._
https://i.postimg.cc/CRtZzk0D/6-images-in-document.jpg (https://postimg.cc/CRtZzk0D)
_.. we see that we appear to get for each image a .jpg and a .png
https://i.postimg.cc/McQnRHZL/6-x-2-pics-6-jpg-png-pairs.jpg (https://postimg.cc/McQnRHZL)

( By the way, We can see some info from Microsoft on this …. To extract embedded images from a Word document …… Save As ….. Web Page (*.htm; *.html)
Images will be extracted from the document and placed in the folder named <DocumentName>_files in the same location as the saved web page .
https://support.microsoft.com/en-us/topic/wd-how-to-extract-embedded-images-from-a-word-document-f478bf7f-3bba-6afb-6ddc-3eeb284af36b
http://web.archive.org/web/20210302151819/https://support.microsoft.com/en-us/topic/wd-how-to-extract-embedded-images-from-a-word-document-f478bf7f-3bba-6afb-6ddc-3eeb284af36b )

Macro to get this image info.
It’s not too difficult to write a macro to list those files
Example
VBA seems to recognise in the following macro type both .htm and .txt files as just long strings of text.
So I can do a macro to import that text string, then do some simple string manipulation to get the text bits looking like .jpg or .png file names

I will do that in the next post

DocAElstein
09-14-2021, 12:59 PM
Macro to get this image info.
It’s not too difficult to write a macro to list those files
Example, Sub ListThe_jpgs_pngs()
VBA seems to recognise in the following macro type both .htm and .txt files as just long strings of text, so I can equally use my .htm or .txt file version of a file like the OPs 2. KEEP DUPLICATE RECORDS
The macro below imports that text string, then does some simple string manipulation to get the text bits looking like .jpg or .png file names


Sub ListThe_jpgs_pngs()
Rem 1 get the entire documant as a long text string in variable, TotalDoc
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function http://web.archive.org/web/20210914055920/https://docs.microsoft.com/en-us/office/vba/Language/Reference/User-Interface-Help/freefile-function
Dim PathAndFileName As String, TotalDoc As String
Let PathAndFileName = ThisWorkbook.Path & "\" & "2. KEEP DUPLICATE RECORDS.htm" '
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
TotalDoc = Space(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
Get #FileNum, , TotalDoc
Close #FileNum
Rem 2 Our text stuff content
Dim OurStuffTxt As String, Strt As Long, Stp As Long
Let Strt = InStr(1, TotalDoc, "<div class=WordSection1>", vbBinaryCompare) + 25 ' +25 takes us to the end of "<div class=WordSection1>"
Let Stp = InStr(Strt, TotalDoc, "</div>", vbBinaryCompare)
Let OurStuffTxt = Mid(TotalDoc, Strt, Stp - Strt)
Rem 3 getting at the .jpgs
Dim Pos_jpg As Long
'3a The first position, if there is one. If there isn't one then the next code line will return 0
Let Pos_jpg = InStr(1, OurStuffTxt, ".jpg", vbBinaryCompare) ' from the start of out stuff text string , 1 , we look for a .jpg
Do While Pos_jpg <> 0 ' I will keep picking out the file names as long as I find another
'3b if I have a .jpg , I will keep adding the name to a long string. Each file name will be seperated by a new line , ( which in VBA caan be represented in the text string by the two "invisible" characters carriage return, vbCr and line feed, vbLf - these two thinbgs are a throw back to old days when in the text string you had something to tell the printer to go back to the left ( carriage return ) and click the spindle up a line/ feed up a new line of paper, line feed
Let Strt = InStrRev(OurStuffTxt, "/", Pos_jpg, vbBinaryCompare) ' looking backwards from position Pos_jpg to get at like in stuff like ............%20RECORDS-Dateien/image004.jpg"
Dim Jpgs As String
Let Jpgs = Jpgs & Mid(OurStuffTxt, Strt + 1, (Pos_jpg + (4 - 1)) - Strt) & vbCr & vbLf ' A bit of string manipulatzion to get the jpg file name text then add a bit to give the next line for adding the next one

Let Pos_jpg = InStr(Pos_jpg + 4, OurStuffTxt, ".jpg", vbBinaryCompare) ' i trx again to find the next .jpg if there is one. This is similar to the code line looking for the first .jpg The difference is that I start looking at the position of the last one so as not to find one that I already considered
Loop ' While Pos_jpg <> 0
MsgBox prompt:=".jpg names in string" & vbCr & vbLf & vbCr & vbLf & Jpgs
Debug.Print ".jpg names in string" & vbCr & vbLf & vbCr & vbLf & Jpgs & vbCr & vbLf & vbCr & vbLf ' same output again in Immediate window ( Ctrl+g to get it up when looking in VB editor ) add a couple of lines to seperate it from the next png section

Rem 4 getting at the .pngs
Dim Pos_png As Long
'4a
Let Pos_png = InStr(1, OurStuffTxt, ".png", vbBinaryCompare) '
Do While Pos_png <> 0 '
'4b
Let Strt = InStrRev(OurStuffTxt, "/", Pos_png, vbBinaryCompare)
Dim Pngs As String
Let Pngs = Pngs & Mid(OurStuffTxt, Strt + 1, (Pos_png + (4 - 1)) - Strt) & vbCr & vbLf '

Let Pos_png = InStr(Pos_png + 4, OurStuffTxt, ".png", vbBinaryCompare) ' i trx again to find the next .jpg if there is one. This is similar to the code line looking for the first .jpg The difference is that I start looking at the position of the last one so as not to find one that I already considered
Loop ' While Pos_png <> 0
MsgBox prompt:=".png names in string" & vbCr & vbLf & vbCr & vbLf & Pngs
Debug.Print ".png names in string" & vbCr & vbLf & vbCr & vbLf & Pngs

End Sub

Here is the typical output
TypicalOutputFrom Sub ListThe_jpgs_pngs()
https://i.postimg.cc/G8pjf1pF/Typical-Output-From-Sub-List-The-jpgs-pngs.jpg (https://postimg.cc/G8pjf1pF)


.jpg names in string

image002.jpg
image004.jpg
image006.jpg
image008.jpg
image010.jpg
image012.jpg



.png names in string

image001.png
image003.png
image005.png
image007.png
image009.png
image011.png

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgwhVTFaD469mW9wO194AaABAg.9gJzxwFcnPU9gORqKw5t W_ (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgwhVTFaD469mW9wO194AaABAg.9gJzxwFcnPU9gORqKw5t W_)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugyb8nmKKoXvcdM58gV4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugyb8nmKKoXvcdM58gV4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgwvvXcl1oa79xS7BAV4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgwvvXcl1oa79xS7BAV4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgxvIFArksPprylHXYZ4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgxvIFArksPprylHXYZ4AaABAg)
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg (https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ)
https://www.youtube.com/watch?v=jdPeMPT98QU (https://www.youtube.com/watch?v=jdPeMPT98QU)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
09-15-2021, 12:50 PM
Saving Word doc containing images, as .htm produces a folder with images in it
So we have established that saving Word doc containing images, as .htm produces a folder with images in it , and we can even find a bit of Microsoft (https://support.microsoft.com/en-us/topic/wd-how-to-extract-embedded-images-from-a-word-document-f478bf7f-3bba-6afb-6ddc-3eeb284af36b) documentation (http://web.archive.org/web/20210302151819/https://support.microsoft.com/en-us/topic/wd-how-to-extract-embedded-images-from-a-word-document-f478bf7f-3bba-6afb-6ddc-3eeb284af36b) about it

As Microsoft have “wired it” to do this, we might find some useful information in the arguments Iin the Save As code line

This is the OPs original
ActiveDocument.SaveAs strPath & "" & strDocumentName, wdFormatHTML, , , , , True
In detail:
strPath & "" & strDocumentName,
wdFormatHTML,
,
,
,
,
True

Here for comparison what the macro recorder typically gave me:
ActiveDocument.SaveAs FileName:="docHTML2.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
In detail:
FileName:="docHTML2.htm",
FileFormat:=wdFormatHTML,
LockComments:= False,
Password:="",
AddToRecentFiles:= True,
WritePassword:="",
ReadOnlyRecommended:= False,
EmbedTrueTypeFonts:= False,
SaveNativePictureFormat:= False,
SaveFormsData:= False,
SaveAsAOCELetter:=False

Unnamed arguments, as used by the OP, must go in correct order. Named argumenzts, as I am using, do not have to go in order, but as far as I am aware the macro recorder does
_ give them in order, and
_ usually gives a lot of the arguments in their default values.
So we can re write the equivalent named argument version of the OPs code line thus:
FileName:= strPath & "" & strDocumentName,
FileFormat:= wdFormatHTML,
LockComments:=False,
Password:="",
AddToRecentFiles:=True,
WritePassword:="",
ReadOnlyRecommended:= True


Conclusion here is that we are more or less doiung the same thing, - a recommendation for read only likely just causes some extra warnings when the file is opened. That is of little concern to our issues

DocAElstein
09-15-2021, 02:19 PM
Word File Save As ___.htm


At this stage, I would like to check what happens in terms of produced files and folders for some different files

The OP’s file
_ as he gave it, named 2. KEEP DUPLICATE RECORDS.docx
_ name changed to 2_ KEEP DUPLICATE RECORDS.docx
_ name changed to the Office 97 – 2003 format 2_ KEEP DUPLICATE RECORDS.doc
_ the file with all images removed
_ the file with everything removed

_ a new virgin file


I will do all that programmatically, for convenience and consistency since I might repeat the experiment in different Excel versions. ( So far most of my work is in Office 2007 )


As a prelude to that, to help get some syntaxes, I will do some of that manually first, whilst running a macro recorder

This is approximately what the macro recorder gave me. I have simplified it a bit and added some 'comments


Sub Makro7()
'
' Makro7 Makro https://excelfox.com/forum/showthread.php/2348-Just-Testing-Passing-info-between-Word-and-Excel?p=15643&viewfull=1#post15643
'
' OPs original file
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\"
Documents.Open Filename:="""2. KEEP DUPLICATE RECORDS.docx""", ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:="", DocumentDirection:=wdLeftToRight
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Orig inal OP File\"
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file

' OPs file with dot in name changed to underscore
RecentFiles(3).Open
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Ops File with dot in name changed to underscore\"
ActiveDocument.SaveAs Filename:="2_ KEEP DUPLICATE RECORDS.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2_ KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file

' File in Office 97 - 2003 format
RecentFiles(3).Open
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Ops file in 97 -2003 format\"
ActiveDocument.SaveAs Filename:="2_ KEEP DUPLICATE RECORDS.doc", FileFormat:=wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2_ KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file

' Ops file no images
RecentFiles(3).Open
Selection.MoveDown Unit:=wdLine, Count:=6
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeBackspace
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Ops File no images\"
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS no images.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS no images.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file

' Empty OP file
RecentFiles(3).Open
Selection.WholeStory
Selection.TypeBackspace
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\OPs file empty\"
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS empty.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS empty.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="2. KEEP DUPLICATE RECORDS empty.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file

' Virgin file
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0 ' make file
ChangeFileOpenDirectory "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\Virg in empty file\"
ActiveDocument.SaveAs Filename:="Dok2.docx", FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.SaveAs Filename:="Dok2.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveWindow.View.Type = wdWebView
ActiveDocument.Close ' close the .htm file
End Sub

Here is the files produced

' OPs original file

https://i.postimg.cc/Sj6zhRXK/OPs-original-file.jpg (https://postimg.cc/Sj6zhRXK)

' OPs file with dot in name changed to underscore
https://i.postimg.cc/GTxBJg0D/OPs-file-with-dot-in-name-changed-to-underscore.jpg (https://postimg.cc/GTxBJg0D)

' File in Office 97 - 2003 format
https://i.postimg.cc/62gsbBKJ/File-in-97-2003-format.jpg (https://postimg.cc/62gsbBKJ)

' Ops file no images
https://i.postimg.cc/ph85yXqq/Ops-file-all-images-removed.jpg (https://postimg.cc/ph85yXqq)

' Empty OP file
https://i.postimg.cc/0KsMSR4x/Ops-file-emptied.jpg (https://postimg.cc/0KsMSR4x)

' Virgin file
https://i.postimg.cc/sMDWKzgg/Virgin-File.jpg (https://postimg.cc/sMDWKzgg)




We seem to have some inconstancy with the files and folders produced by the original OP macro, ( https://excelfox.com/forum/showthread.php/2761-Get-Pictures-from-Word-Documents-in-All-Sub-Folders?p=15623&viewfull=1#post15623 ) , so in the next post I had better check that first..
The inconstancy seems to be that a .htm file was not produced – instead some strange file was there , one with no extension shown, and the new file folder produced did not have the full name 2. KEEP DUPLICATE RECORDS-Files , instead it came out as 2-Files
36253626



https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxzpgHWTLGj0C3q3gx4AaABAg.9gxsUMU53al9k5c8W6QG E8 (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxzpgHWTLGj0C3q3gx4AaABAg.9gxsUMU53al9k5c8W6QG E8)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h4ISxLD1 7d (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h4ISxLD1 7d)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h4LdsDET im (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h4LdsDET im)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h32czjty R_ (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugz2PzvZTJyxHz70eVF4AaABAg.9gxDYq2iiZ89h32czjty R_)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxzpgHWTLGj0C3q3gx4AaABAg (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxzpgHWTLGj0C3q3gx4AaABAg)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugw_smEwvNffCPr_nrB4AaABAg.9gvyL53lI1l9gxwd_9-V6z (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugw_smEwvNffCPr_nrB4AaABAg.9gvyL53lI1l9gxwd_9-V6z)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugy7vmiHsQ0oUt2QCPZ4AaABAg.9gvoy4OW6lU9gxwxC5-rL9 (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=Ugy7vmiHsQ0oUt2QCPZ4AaABAg.9gvoy4OW6lU9gxwxC5-rL9)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgzuX3uYmqJRtsZIbqF4AaABAg.9gth61YhXKB9gxxCMdRL A0 (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgzuX3uYmqJRtsZIbqF4AaABAg.9gth61YhXKB9gxxCMdRL A0)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxcPC64RQGmXwO5rft4AaABAg.9gtQLXaeg0e9gxxNuc5C CM (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgxcPC64RQGmXwO5rft4AaABAg.9gtQLXaeg0e9gxxNuc5C CM)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwCY8vOs1DFHgYSJwF4AaABAg.9godrFcyWYw9gxy1odpi Rj (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwCY8vOs1DFHgYSJwF4AaABAg.9godrFcyWYw9gxy1odpi Rj)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgyL5nh_j8w70-YBoUt4AaABAg.9goMcRjwjtc9gxyslvuZKx (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgyL5nh_j8w70-YBoUt4AaABAg.9goMcRjwjtc9gxyslvuZKx)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwwWRgmRZNqJKptHR14AaABAg.9go-DbayTZa9gxzPbefHXf (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwwWRgmRZNqJKptHR14AaABAg.9go-DbayTZa9gxzPbefHXf)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwF3wECwc8tVoRmz6B4AaABAg.9go-5xLQM8P9gxzmB7nkVQ (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgwF3wECwc8tVoRmz6B4AaABAg.9go-5xLQM8P9gxzmB7nkVQ)
https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgyRDmGTHnMdT7dl_qx4AaABAg (https://www.youtube.com/watch?v=xLCWtC6UYrM&lc=UgyRDmGTHnMdT7dl_qx4AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
09-15-2021, 03:40 PM
We seem to have some inconstancy with the files and folders produced by the original OP macro, ( https://excelfox.com/forum/showthread.php/2761-Get-Pictures-from-Word-Documents-in-All-Sub-Folders?p=15623&viewfull=1#post15623 ) , and those in the last post, so I will look into that here.
The inconstancy seems to be that a .htm file was not produced by the original OP macro– instead some strange file was there , one with no extension shown, and the new file folder produced did not have the full name 2. KEEP DUPLICATE RECORDS-Files , instead it came out as 2-Files
36253626


I had a little play around, and it looks I have tracked down the problem.
To demo:-
The following macro doers three Save As .htm code lines. The first does something similar to the original OP’s
The second has replaced the first _ . _ in the file name with a _ _ _
The final code line does the code line what the macro recorder gave.

Looking at the three results, it is obvious what’s probably going on: The missing .htm in the OP’s code line is causing the problem. Although we are saving as FileFormat:=wdFormatHTML , it gets no extension on the file name.
Without knowing exactly how Microsoft organised the working things, I cannot say exactly what is going on, but then file shown with no extension is clearly the htm file – we can prove this by opening with word, and it appears exactly the same as any of the 2. KEEP DUPLICATE RECORDS.htm files that we have been producing. The little discrepancy fact that the folder containing the images gets a name like 2-xxxx instead of like 2-2. KEEP DUPLICATE RECORDS xxxx , is probably because the workings are somehow mistaking the first _ . _ as the extension _ . _.
That discrepancy does not appear when we replace the _ . _ with some other character, as in the second Save As .htm code line
In fact, we also get a normal .htm extension as well. So this suggests that the workings are somehow confusing that first _ . _ as meaning that the extension is _ KEEP DUPLICATE RECORDS


So the conclusion is:
Most important you should add the .htm extension on the given file name.
It is probably good practice to not have an extra _ . _ in any file name


Results:
ActiveDocument.SaveAs FileName:=strPath & "Temp1" & "" & "2. KEEP DUPLICATE RECORDS", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:= True
https://i.postimg.cc/dkKVKs3f/Temp-1.jpg (https://postimg.cc/dkKVKs3f)

ActiveDocument.SaveAs FileName:=strPath & "Temp2" & "" & "2_ KEEP DUPLICATE RECORDS", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False
https://i.postimg.cc/qtKvYhJn/Temp-2.jpg (https://postimg.cc/qtKvYhJn)

ActiveDocument.SaveAs FileName:=TempFolder & "" & "2. KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False ', EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
https://i.postimg.cc/gxQ0NqWm/Temp-3.jpg (https://postimg.cc/gxQ0NqWm)



Sub OPsFileMakesStrangeFiles() ' https://excelfox.com/forum/showthread.php/2348-Just-Testing-Passing-info-between-Word-and-Excel?p=15644&viewfull=1#post15644
Dim strPath As String: Let strPath = "F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\"
Documents.Open Filename:="F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\2. KEEP DUPLICATE RECORDS.docx" ' This wont error if document file is already open

If Dir(strPath & "Temp1", vbDirectory) = "" Then MkDir strPath & "Temp1"
ActiveDocument.SaveAs Filename:=strPath & "Temp1" & "\" & "2. KEEP DUPLICATE RECORDS", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=True
ActiveDocument.Close

Documents.Open Filename:="F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\2. KEEP DUPLICATE RECORDS.docx" ' This wont error if document file is already open
If Dir(strPath & "Temp2", vbDirectory) = "" Then MkDir strPath & "Temp2"
ActiveDocument.SaveAs Filename:=strPath & "Temp2" & "\" & "2_ KEEP DUPLICATE RECORDS", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False
ActiveDocument.Close

Documents.Open Filename:="F:\Excel0202015Jan2016\ExcelFox\Word\prkhan56\2. KEEP DUPLICATE RECORDS.docx" ' This wont error if document file is already open
If Dir(strPath & "Temp3", vbDirectory) = "" Then MkDir strPath & "Temp3"
ActiveDocument.SaveAs Filename:=TempFolder & "\" & "2. KEEP DUPLICATE RECORDS.htm", FileFormat:=wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False ', EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
ActiveDocument.Close
End Sub

DocAElstein
09-16-2021, 09:05 PM
https://i.postimg.cc/L61Y4HcP/Aufzeichnen2.jpg (https://blog.mozilla.org/en/internet-culture/deep-dives/why-are-hyperlinks-blue/)


https://i.postimg.cc/CK7CSF30/Aufzeichnen3.jpg (https://postimages.org/)

https://i.postimg.cc/WbKXH6rv/Aufzeichnen4.jpg (https://postimages.org/)upload pictures (https://postimages.org/de/)

https://i.postimg.cc/WbKXH6rv/Aufzeichnen4.jpg (https://eileenslounge.com/viewtopic.php?p=288452#p288452)


test

Hi
Mein Deutsch nicht so gut ist, da ich Engländer bin, aber ich werde es versuchen...
Dies hängt mit einigen anderen ungelösten Dingen zusammen ( https://www.dsl-forum.de/threads/25111-speedport-w504v-nicht-kommunizieren-online-verbunden
https://telekomhilft.telekom.de/t5/Telefonie-Internet/Ich-kann-keinen-Ausfall-unseres-Telefon-und-Internet-Festnetzes/td-p/5342695 )
Seit etwa einem Monat funktioniert meine Internetverbindung nicht mehr. Anfangs dachte man, es könnte ein Problem mit meinem alten Speedport W504V-Router sein.
Ich war daran interessiert, weiter zu experimentieren, um diesen Verdacht zu bestätigen.

Die Ergebnisse sind etwas seltsam:

Ich habe noch ein paar andere Speedport W504Vs bekommen, die normal funktionierten, vor sie nicht mehr benutz, bzw. nicht mehr gebraucht war, und auch ein neues originalverpacktes, das nie benutzt wurde.
Sie weisen alle das gleiche Problem auf wie ursprünglich bei meinem alten Speedport W504V: Sie verbinden sich alle erfolgreich, gehen online, aber das Internet funktioniert nicht und sie antworten weder auf 192.168.2.1 noch auf https://speedport.ip in der Adressleiste
Hier sind typische Ergebnisse einer erfolgreichen Verbindung für eine direkte LAN-Kabelverbindung:
https://i.postimg.cc/8CKFTQzM/Speedport-Connect-via-LAN-Kable.jpg
und hier sind typische Ergebnisse für eine erfolgreiche WLAN-Verbindung
https://i.postimg.cc/fRsSKfPt/First-use-Speedport-W504-V-via-WLAN-Connected.jpg
https://i.postimg.cc/FRYYRWYq/First-use-Speedport-W504-V-via-WLAN-Schluessel-Geben.jpg
https://i.postimg.cc/TYgWg4tv/First-use-Speedport-W504-V-via-WLAN-Connected.jpg
https://i.postimg.cc/VNLryLmz/First-use-Speedport-W504-V-via-WLAN-Connected-working.jpg
Aber danach bekommt man kein funktionierendes Internet, und beim IP 192.168.2.1 oder https://speedport.ip in die Adresszeile eingebe, kommt nur "Fehler: Netzwerk-Zeitüberschreitung - Der Server unter speedport.ip braucht zu lange, um eine Antwort zu senden." Egal mit welchem Browser oder Computer

Das Überprüfen von Dingen wie ipconfig usw. bestätigt alle Gateway 192.168.2.1, wie es für den Speedport erwartet wird

Der ganz neue Speedport reagierte bei der ersten Verbindung etwas anders, wie es sich gehört: Ein neuer Speedport bewirkt ein anfängliches Öffnen eines Browser-Tabs direkt beim anfänglichen Einrichtungsvorgang:
https://i.postimg.cc/CMJGdtrP/New-Speedport-W504-V-First-LAN-connection.jpg
https://i.postimg.cc/Xq2dhGyS/New-Speedport-W504-V-First-LAN-connection-ignore-warning.jpg
https://i.postimg.cc/7hPSmMhn/New-Speedport-W504-VFirst-LANConnection-Konfiguration.jpg

Aber das scheitert beim ersten Schritt: Ich tippe hier das richtige Passwort ein, aber ich bekomme eine Fehlermeldung und komme nicht weiter.
https://i.postimg.cc/FRVjynrK/New-Speedport-W504-VFirst-LANConnection-Konfiguration-Fail-At-Password.jpg


Was das Ganze noch seltsamer macht, ist, dass ich einige alte Speedport W723s habe und sie alle normal funktionieren, mir ein funktionierendes Internet geben und auch wie erwartet reagieren, wenn sie 192.168.2.1 oder https://speedport.ip in die Adressleiste eingeben

Andere Router, die ich habe, funktionieren auch normal.

Ich habe meine Experimente mit vielen verschiedenen Computern mit unterschiedlichen Betriebssystemen wiederholt und die Ergebnisse sind immer gleich.

Es ist nicht möglich, dass alle meine Speedport W504v kaputt sind. Ich gehe davon aus, dass sie alle so funktionieren, wie sie ursprünglich entwickelt wurden.
Es scheint, dass etwas Seltsames passiert ist, so dass kein Speedport W504V mehr funktioniert???

Habe die Telekom eine grundlegende Änderung vorgenommen, wonach ein Speedport W504V nun nie mehr funktioniert???


Alan
Direct link for forum
mg[/B]]https[I]://i.postimg.cc/QC7swWy4/Here-Excel-forum-colors-ohne-rand.jpg[/img]

https://i.postimg.cc/7PJxfpZ3/Here-Excel-fox-colors-ohne-rand.jpg

now change link to post imagers to the link you want it to got to

https://i.postimg.cc/QC7swWy4/Here-Excel-forum-colors-ohne-rand.jpg (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938) or https://i.postimg.cc/7PJxfpZ3/Here-Excel-fox-colors-ohne-rand.jpg (https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=15706&viewfull=1#post15706)

Hello Chris, ( and Stuart )
In Excel things occasionally go out of whack in my VB Editor and I am buggered if I can ever find a way to get them back normally using any conventional method. Usually the docking of windows getting corrupted has been to blame.
So far the sledgehammer approach explained https://i.postimg.cc/QC7swWy4/Here-Excel-forum-colors-ohne-rand.jpg (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938) has always put the VB Editor back to normal for me.
( In case that old post link does not work, or they insist on you logging in and you don’t want to, I just put a copy of that post https://i.postimg.cc/7PJxfpZ3/Here-Excel-fox-colors-ohne-rand.jpg (https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=15706&viewfull=1#post15706) for you )

( you might need to look at a slightly different path in the registry. Someone else said they found it here: Computer\HKEY_CURRENT_USER\Software\Microsoft\VBA\ 7.1\Common

Alan

DocAElstein
09-16-2021, 09:05 PM
https://i.postimg.cc/8k0mY0bK/Aufzeichnen.jpg (https://eileenslounge.com/viewtopic.php?p=288452#p288452)

_.______________
Here

Here

ExcelFox


ExcelFox


Here


Here


https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938

https://i.postimg.cc/9Rf6XHnm/Here-link-Bild.jpg (https://postimages.org/)

https://i.postimg.cc/9Rf6XHnm/Here-link-Bild.jpg[/img] (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938)


_.____________________

_.______________
vorschor bild for forum
https://i.postimg.cc/9Rf6XHnm/Here-link-Bild.jpg (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938)

_.__________________________-
direct link for forum complete
https://i.postimg.cc/j56tXs67/Here-link-Bild.jpg (https://postimages.org/) or https://i.postimg.cc/WzngMQb7/Here-Excel-forum-colors.jpg (https://postimages.org/) 0r https://i.postimg.cc/Y2f6Kmfm/Here-Excel-fox-colors.jpg (https://postimages.org/)
Now change link to postimages.org to the link you want it to go to
https://i.postimg.cc/j56tXs67/Here-link-Bild.jpg (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938) or https://i.postimg.cc/WzngMQb7/Here-Excel-forum-colors.jpg (https://www.excelforum.com/excel-programming-vba-macros/343845-docking-project-explorer-vertically.html#post4545938) or https://i.postimg.cc/Y2f6Kmfm/Here-Excel-fox-colors.jpg (https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=15706&viewfull=1#post15706)

DocAElstein
02-08-2022, 09:29 PM
ABADB

DocAElstein
02-08-2022, 09:29 PM
dbABDBD


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxUbeYSvsBH2Gianox4AaABAg.9VYH-07VTyW9gJV5fDAZNe)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgyhQ73u0C3V4bEPhYB4AaABAg)
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ (https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgzIElpI5OFExnUyrk14AaABAg.9fsvd9zwZii9gMUka-NbIZ)
https://www.youtube.com/watch?v=jdPeMPT98QU (https://www.youtube.com/watch?v=jdPeMPT98QU)
https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg (https://www.youtube.com/watch?v=QdwDnUz96W0&lc=Ugx3syV3Bw6bxddVyBx4AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
02-08-2022, 09:29 PM
ascsaasd

DocAElstein
02-08-2022, 09:29 PM
XBAmba

DocAElstein
02-08-2022, 09:29 PM
BDAdbABD

DocAElstein
02-08-2022, 09:29 PM
A;;MBABDA

DocAElstein
02-08-2022, 09:29 PM
aabaNDB

DocAElstein
02-08-2022, 09:29 PM
ssbbd

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg (https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg)
https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNsaS3Lp1 (https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNsaS3Lp1)
https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgR1EPUkhw (https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgR1EPUkhw)
https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNe_XC-jK (https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNe_XC-jK)
https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNPOdiDuv (https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNPOdiDuv)
https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgN7AC7wAc (https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgN7AC7wAc)
https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M (https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M)
https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg (https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg)
https://www.youtube.com/watch?v=DVFFApHzYVk&lc=Ugyi578yhj9zShmhuPl4AaABAg (https://www.youtube.com/watch?v=DVFFApHzYVk&lc=Ugyi578yhj9zShmhuPl4AaABAg)
https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgxvxlnuTRWiV6MUZB14AaABAg (https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgxvxlnuTRWiV6MUZB14AaABAg)
https://www.youtube.com/watch?v=_8i1fVEi5WY&lc=Ugz0ptwE5J-2CpX4Lzh4AaABAg (https://www.youtube.com/watch?v=_8i1fVEi5WY&lc=Ugz0ptwE5J-2CpX4Lzh4AaABAg)
https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxoHAw8RwR7VmyVBUt4AaABAg.9C-br0lEl8V9xI0_6pCaR9 (https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxoHAw8RwR7VmyVBUt4AaABAg.9C-br0lEl8V9xI0_6pCaR9)
https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=Ugz5DDCMqmHLeEjUU8t4AaABAg.9bl7m03Onql9xI-ar3Z0ME (https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=Ugz5DDCMqmHLeEjUU8t4AaABAg.9bl7m03Onql9xI-ar3Z0ME)
https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxYnpd9leriPmc8rPd4AaABAg.9gdrYDocLIm9xI-2ZpVF-q (https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxYnpd9leriPmc8rPd4AaABAg.9gdrYDocLIm9xI-2ZpVF-q)
https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgyjoPLjNeIAOMVH_u94AaABAg.9id_Q3FO8Lp9xHyeYSuv 1I (https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgyjoPLjNeIAOMVH_u94AaABAg.9id_Q3FO8Lp9xHyeYSuv 1I)
https://www.reddit.com/r/windowsxp/comments/pexq9q/comment/k81ybvj/?utm_source=reddit&utm_medium=web2x&context=3 (https://www.reddit.com/r/windowsxp/comments/pexq9q/comment/k81ybvj/?utm_source=reddit&utm_medium=web2x&context=3)
https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg (https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg)
https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M (https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm9wlhQrYJP 3M)
ttps://www.youtube.com/watch?v=LP9fz2DCMBE (ttps://www.youtube.com/watch?v=LP9fz2DCMBE)
https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg (https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg)
https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg.9wdo_rWgxSH9wdpcYqrv p8 (https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg.9wdo_rWgxSH9wdpcYqrv p8)
ttps://www.youtube.com/watch?v=bFxnXH4-L1A (ttps://www.youtube.com/watch?v=bFxnXH4-L1A)
https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxuODisjo6cvom7O-B4AaABAg.9w_AeS3JiK09wdi2XviwLG (https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxuODisjo6cvom7O-B4AaABAg.9w_AeS3JiK09wdi2XviwLG)
https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxBU39bTptFznDC1PJ4AaABAg (https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxBU39bTptFznDC1PJ4AaABAg)
ttps://www.youtube.com/watch?v=GqzeFYWjTxI (ttps://www.youtube.com/watch?v=GqzeFYWjTxI)
https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgwJnJDJ5JT8hFvibt14AaABAg (https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgwJnJDJ5JT8hFvibt14AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
02-08-2022, 09:29 PM
In support of this forum post
https://excelfox.com/forum/showthread.php/2783-User-Form-entry-in-a-second-sheet-need-help-with-VBA-code?p=16376&viewfull=1#post16376




Before, as we had before


_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFGHI
1S.No.YearMonthNameProjectTaskAmountSubmitted By

2
1
2022JanuarybbbProject2Task2
100Liviu Popescu

3
2
2022FebruarycccProject5Task1
200Liviu Popescu

4
3
2022MarchaaaProject3Task2
500Liviu Popescu

5
Worksheet: Database



_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFG
1NameProjectTask
01-22
02-22
03-22
04-22

2aaaProject1Task1

3aaaProject1Task2

4aaaProject2Task1

5aaaProject2Task2

6aaaProject3Task1

7aaaProject3Task2

8aaaProject4Task1

9aaaProject4Task2

10aaaProject5Task1

11aaaProject5Task2

12bbbProject1Task1

13bbbProject1Task2

14bbbProject2Task1

15bbbProject2Task2

16bbbProject3Task1

17bbbProject3Task2

18bbbProject4Task1

19bbbProject4Task2

20bbbProject5Task1

21bbbProject5Task2

22cccProject1Task1

23cccProject1Task2

24cccProject2Task1

25cccProject2Task2

26cccProject3Task1

27cccProject3Task2

28cccProject4Task1

29cccProject4Task2

30cccProject5Task1

31cccProject5Task2

32dddProject1Task1

33dddProject1Task2
Worksheet: Database1

DocAElstein
02-08-2022, 09:29 PM
In support of this forum post
https://excelfox.com/forum/showthread.php/2783-User-Form-entry-in-a-second-sheet-need-help-with-VBA-code?p=16376&viewfull=1#post16376







After





_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G

1NameProjectTask
01-22
02-22
03-22
04-22


2aaaProject1Task1


3aaaProject1Task2


4aaaProject2Task1


5aaaProject2Task2


6aaaProject3Task1


7aaaProject3Task2
500


8aaaProject4Task1


9aaaProject4Task2


10aaaProject5Task1


11aaaProject5Task2


12bbbProject1Task1


13bbbProject1Task2


14bbbProject2Task1


15bbbProject2Task2
100


16bbbProject3Task1


17bbbProject3Task2


18bbbProject4Task1


19bbbProject4Task2


20bbbProject5Task1


21bbbProject5Task2


22cccProject1Task1


23cccProject1Task2


24cccProject2Task1


25cccProject2Task2


26cccProject3Task1


27cccProject3Task2


28cccProject4Task1


29cccProject4Task2


30cccProject5Task1
200


31cccProject5Task2


32dddProject1Task1
Worksheet: Database1

DocAElstein
02-08-2022, 09:29 PM
In support of this forum post
https://excelfox.com/forum/showthread.php/2783-User-Form-entry-in-a-second-sheet-need-help-with-VBA-code?p=16373&viewfull=1#post16373





_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFGHI
1S.No.YearMonthNameProjectTaskAmountSubmitted By

2
1
2022JanuarybbbProject2Task2
100Liviu Popescu

3
2
2022FebruarycccProject5Task1
200Liviu Popescu

4
3
2022MarchaaaProject3Task2
500Liviu Popescu

5
Worksheet: Database



_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFG
1NameProjectTask
01-22
02-22
03-22
04-22

2aaaProject1Task1

3aaaProject1Task2

4aaaProject2Task1

5aaaProject2Task2

6aaaProject3Task1

7aaaProject3Task2

8aaaProject4Task1

9aaaProject4Task2

10aaaProject5Task1

11aaaProject5Task2

12bbbProject1Task1

13bbbProject1Task2

14bbbProject2Task1

15bbbProject2Task2

16bbbProject3Task1

17bbbProject3Task2

18bbbProject4Task1

19bbbProject4Task2

20bbbProject5Task1

21bbbProject5Task2

22cccProject1Task1

23cccProject1Task2

24cccProject2Task1

25cccProject2Task2

26cccProject3Task1

27cccProject3Task2

28cccProject4Task1

29cccProject4Task2

30cccProject5Task1

31cccProject5Task2

32dddProject1Task1

33dddProject1Task2
Worksheet: Database1

DocAElstein
02-08-2022, 09:29 PM
In support of this forum post
https://excelfox.com/forum/showthread.php/2783-User-Form-entry-in-a-second-sheet-need-help-with-VBA-code?p=16376&viewfull=1#post16376




Before, as we had before


_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFGHI
1S.No.YearMonthNameProjectTaskAmountSubmitted By

2
1
2022JanuarybbbProject2Task2
100Liviu Popescu

3
2
2022FebruarycccProject5Task1
200Liviu Popescu

4
3
2022MarchaaaProject3Task2
500Liviu Popescu

5
Worksheet: Database



_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\ColABCDEFG
1NameProjectTask
01-22
02-22
03-22
04-22

2aaaProject1Task1

3aaaProject1Task2

4aaaProject2Task1

5aaaProject2Task2

6aaaProject3Task1

7aaaProject3Task2

8aaaProject4Task1

9aaaProject4Task2

10aaaProject5Task1

11aaaProject5Task2

12bbbProject1Task1

13bbbProject1Task2

14bbbProject2Task1

15bbbProject2Task2

16bbbProject3Task1

17bbbProject3Task2

18bbbProject4Task1

19bbbProject4Task2

20bbbProject5Task1

21bbbProject5Task2

22cccProject1Task1

23cccProject1Task2

24cccProject2Task1

25cccProject2Task2

26cccProject3Task1

27cccProject3Task2

28cccProject4Task1

29cccProject4Task2

30cccProject5Task1

31cccProject5Task2

32dddProject1Task1

33dddProject1Task2
Worksheet: Database1

DocAElstein
02-08-2022, 09:29 PM
In support of this forum post
https://excelfox.com/forum/showthread.php/2783-User-Form-entry-in-a-second-sheet-need-help-with-VBA-code?p=16376&viewfull=1#post16376







After





_____ Workbook: Work_file.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E
F
G

1NameProjectTask
01-22
02-22
03-22
04-22


2aaaProject1Task1


3aaaProject1Task2


4aaaProject2Task1


5aaaProject2Task2


6aaaProject3Task1


7aaaProject3Task2
500


8aaaProject4Task1


9aaaProject4Task2


10aaaProject5Task1


11aaaProject5Task2


12bbbProject1Task1


13bbbProject1Task2


14bbbProject2Task1


15bbbProject2Task2
100


16bbbProject3Task1


17bbbProject3Task2


18bbbProject4Task1


19bbbProject4Task2


20bbbProject5Task1


21bbbProject5Task2


22cccProject1Task1


23cccProject1Task2


24cccProject2Task1


25cccProject2Task2


26cccProject3Task1


27cccProject3Task2


28cccProject4Task1


29cccProject4Task2


30cccProject5Task1
200


31cccProject5Task2


32dddProject1Task1
Worksheet: Database1

DocAElstein
02-08-2022, 09:32 PM
I hit a problem later
I hit a problem later…. The full main file actually looked like this in a text editor:
https://i.postimg.cc/4mzznGXy/Actual-Main-File.jpg (https://postimg.cc/4mzznGXy)
and it got me an 9 line array, where I was expecting one of 2102
https://i.postimg.cc/hfFLSvWN/arr-Rws-M-Bollox.jpg (https://postimg.cc/hfFLSvWN)

I don’t know how that came about since the four lines file was made and saved in the same ISE environment in which the Main file was and was saved in. But it looks like unfortunately there may be a few, 9 , vbCr & vbLfs.
So, I took a look at a shortened vision of that file, as saved in a text editor, trying to capture some of the problem areas.
This is what I looked at
https://i.postimg.cc/G8VkThB8/Actual-Main-File-Problem-Areas.jpg (https://postimg.cc/G8VkThB8)

Here is the results:


"Function BlochIPhosts " & Chr(123) & "param" & "(" & Chr(91) & "int" & Chr(93) & "$" & "Testie" & ")" & vbCr & vbLf & " " & "$" & "Check " & "=" & " " & "$" & "Testie" & vbCr & vbLf & "Write" & "-" & "Host " & """" & "Adding telemetry domains to hosts file" & """" & " " & "#" & " Write" & "-" & "Output " & """" & "Adding telemetry domains to hosts file" & """" & vbCr & vbLf & "$" & "hosts" & "_" & "file " & "=" & " " & """" & "$" & "env" & ":" & "systemroot" & "\" & "System32" & "\" & "drivers" & "\" & "etc" & "\" & "hosts" & """"

"Add" & "-" & "Type " & "-" & "AssemblyName System" & "." & "Windows" & "." & "Forms" & vbLf & Chr(91) & "System" & "." & "Windows" & "." & "Forms" & "." & "Application" & Chr(93) & ":" & ":" & "EnableVisualStyles" & "(" & ")" & " " & "#" & vbLf & "Remove" & "-" & "Variable " & Chr(42) & " " & "-" & "ErrorAction SilentlyContinue " & "#" & " is needed or else a removed variable is still there when fucking about with variables" & "." & " by default variables are persistant" & "." & vbLf & "$" & "ErrorActionPreference " & "=" & " " & "'" & "SilentlyContinue" & "'"

"Add" & "-" & "Type " & "-" & "AssemblyName System" & "." & "Windows" & "." & "Forms " & "#" & " For ps1 in PowerShell running code lines in PowerShell with Admin rights of the following form are what you need to set this off Set" & "-" & "ExecutionPolicy Unrestricted cd " & "'" & "G" & ":" & "\" & "Temp Opt" & "\" & "GitHub" & "\" & "win10script" & "-" & "master" & "\" & "My ps1 file Folder" & "'" & " " & "." & "\" & "win10debloat6Dec" & "-" & "31Dec" & "." & "ps1 " & vbLf & Chr(91) & "System" & "." & "Windows" & "." & "Forms" & "." & "Application" & Chr(93) & ":" & ":" & "EnableVisualStyles" & "(" & ")" & " " & "#" & vbLf & "Remove" & "-" & "Variable " & Chr(42) & " " & "-" & "ErrorAction SilentlyContinue " & "#" & " is needed or else a removed variable is still there when fucking about with variables" & "." & " by default variables are persistant" & "." & vbLf & "$" & "ErrorActionPreference " & "=" & " " & "'" & "SilentlyContinue" & "'" & vbLf
& "$" & "wshell " & "=" & " New" & "-" & "Object " & "-" & "ComObject Wscript" & "." & "Shell" & vbLf & "$" & "Button " & "=" & " " & Chr(91) & "System" & "." & "Windows" & "." & "MessageBoxButton" & Chr(93) & ":" & ":" & "YesNoCancel" & vbLf & "$" & "ErrorIco " & "=" & " " & Chr(91) & "System" & "." & "Windows" & "." & "MessageBoxImage" & Chr(93) & ":" & ":" & "Error" & vbLf & "If " & "(" & "!" & "(" & Chr(91) & "Security" & "." & "Principal" & "." & "WindowsPrincipal" & Chr(93) & Chr(91) & "Security" & "." & "Principal" & "." & "WindowsIdentity" & Chr(93) & ":" & ":" & "GetCurrent" & "(" & ")" & ")" & "." & "IsInRole" & "(" & Chr(91) & "Security" & "." & "Principal" & "." & "WindowsBuiltInRolpl" & vbLf & Chr(125) & ")" & vbLf & "$" & "oldcontrolpanel" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbLf & " cmd " & "/" & "c control" & vbLf & Chr(125) & ")" & vbLf & "$" & "oldsystempanel" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbLf & " cmd " & "/" & "c sysdm" & "." & "cpl" & vbLf & Chr(125
) & ")" & vbLf & "#" & " " & "$" & "oldpower" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbCr & vbLf & vbCr & vbLf & "#" & " " & Chr(125) & ")" & vbLf & "#" & " " & "$" & "restorepower" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & "#" & " " & Chr(125) & ")" & vbLf & "#" & " " & "$" & "NFS" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & "#" & " " & Chr(125) & ")" & vbLf & vbLf & "#" & " " & "$" & "Virtualization" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & vbLf & "#" & " " & Chr(125) & ")" & vbLf & vbLf & "$" & "windowsupdatefix" & "." & "Add" & "_" & "Click" & "(" & Chr(123) & vbLf & " Write" & "-" & "Host " & """" & "1" & "." & " Stopping Windows Update Services" & "." & "." & "." & """" & " " & vbLf & " Stop" & "-" & "Service "
& "-" & "Name BITS " & vbLf & " " & " "

From that above output we can see 11, so that’s 10 lines rather than 9. This inconsistency by 1 is somewhat worrying.
I looked at the array produced from that shortened text file, and it is as before, 9
One possibility is that some length restriction is long some of the line feed pairs, or a line slipped in at my making of the shortened file

For the masochistic pleasure I tried the full main file in the first simple macro. To my surprise, it worked, after a few hours, the result came out.
Temp7BeforeIPhostsInsertFirst4Lines_ps1WtchaGot https://app.box.com/s/12zw9id42xrwc7qy70ul87bg0wfpb4uh
Temp7BeforeIPhostsInsertFirst4Lines_ps1WtchaGot https://app.box.com/s/771q1gzpycle7ccveu235j256n4l4xyb
It returned 8, making 9 lines.

So that discrepancy is perhaps sorted.
My initial conclusions may have based on slightly careless manipulations that brought some invisible characters in.

One possibility is that the original main coding came from GitHub: This for example talks about the line feed issue at GitHub
http://vcloud-lab.com/entries/devops/resolved-git-warning-lf-will-be-replaced-by-crlf-in-file#at_pco=smlwn-1.0&at_si=624547148f04cd41&at_ab=per-2&at_pos=0&at_tot=1

DocAElstein
02-08-2022, 09:32 PM
This is post https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA/page8#post16491
https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA?p=16491&viewfull=1#post16491
https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA/page8#post16491
https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA?p=16491&viewfull=1#post16491



So I will make a function, just for convenience even though I am not so keen on those things
It will take in
_(i) The two file names , the main one, and then the one to be inserted,
_(ii) the line at which to insert, and optional the number of lines to insert, ( if no number is given, I assume all lines want to be inserted from the second file )
_ an optional name for the output file, ( if none is given I will add something like the date to the name of the original main file, and call it that)

_(iii) Based on the results from the last post, I probably will need to keep my eye on the line feed issue. For now the way to proceed could be to first replace all vbCr & vbLf with vbLf, to get them hopefully all to the same , and then after replace all vbLf with vbCr & vbLf
_ (iv) I assume all files are in the same folder

The techniques used to bring the files into 1 dimensional array of rows are tried and trusted, used many times before. I have the main file in a master array , arrRwsM() , and the file to be merged into it is in the array, arrRws()
At the point of the code development, where these arrays were made, I checked the contents, and there was perfect agreement between the rows in the ps1 files, and the elements of the arrays.

So what is new is to combine, merge, the files as required
A simple loop will do, that tacks on the extra coding from the left in the master code array.
We don’t need to add many spaces, since usually there is already many since the commented lines are over to the right. This is a simple coding bit to do that,
______ arrRwsM(LnNbr - 1) = arrRws(LnNbr - StRw) & arrRwsM(LnNbr - 1)
For LnNbr = StRw To Rws + StRw - 1 ' This - 1 is the usual “getting end row from start row and count of rows” issue - its always (the start row) + ( Rows count - 1 )
Let arrRwsM(LnNbr - 1) = arrRws(LnNbr - StRw) & arrRwsM(LnNbr - 1) ' The - 1 here is because the one dimensional arrays start at 0, so the lines we are intersted in are 1 element back from where we might have expected them
Next LnNbr

Its extremely easy now to remake the modified text file by joining the modified array elements by a line separator,
____ TotalFile = Join(arrRwsM(), vbCr & vbLf)
( For now I will stay with the vbCr & vbLf , as my personal preference )

' https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA/page8#post16491
Sub testieIt() ' https://excelfox.com/forum/showthread.php/2559-Notes-tests-text-files-manipulation-of-text-files-in-Excel-and-with-Excel-VBA?p=16491&viewfull=1#post16491
Call MergeScriptFiles("Temp7BeforeIPhostsInsert.ps1", "blockIPhostsRawAll250.ps1", 201, , "Temp8.ps1")
End Sub
' ByVal TxtM As String, ByVal TxtInst As String, ByVal StRw As Long, Optional ByVal Rws As Long, Optional ByVal FlNmeOut As String
Public Function MergeScriptFiles(ByVal TxtM As String, ByVal TxtInst As String, ByVal StRw As Long, Optional ByVal Rws As Long, Optional ByVal FlNmeOut As String)
Rem 1 main file
' Get the text file as a long single string
Dim FileNum As Long: Let FileNum = FreeFile(1) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName As String, TotalFile As String
Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & TxtM ' CHANGE TO SUIT From vixer zyxw1234 : http://www.eileenslounge.com/viewtopic.php?f=30&t=34629 DF.txt https://app.box.com/s/gw941dh9v8sqhvzin3lo9rfc67fjsbic
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
Get #FileNum, , TotalFile
Close #FileNum 'Debug.Print TotalFile
Let TotalFile = Replace(TotalFile, vbCr & vbLf, vbLf, 1, -1, vbBinaryCompare)
Let TotalFile = Replace(TotalFile, vbLf, vbCr & vbLf, 1, -1, vbBinaryCompare)
' make a 1 D array of the Main text file
Dim arrRwsM() As String: Let arrRwsM() = Split(TotalFile, vbCr & vbLf, -1, vbBinaryCompare)

Rem 2 file to insert
Let PathAndFileName = ThisWorkbook.Path & Application.PathSeparator & TxtInst ' CHANGE TO SUIT From vixer zyxw1234 : http://www.eileenslounge.com/viewtopic.php?f=30&t=34629 DF.txt https://app.box.com/s/gw941dh9v8sqhvzin3lo9rfc67fjsbic
Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundamental type data input...
Let TotalFile = Space(LOF(FileNum)) '....and wot receives it has to be a string of exactly the right length
Get #FileNum, , TotalFile
Close #FileNum 'Debug.Print TotalFile
Let TotalFile = Replace(TotalFile, vbCr & vbLf, vbLf, 1, -1, vbBinaryCompare)
Let TotalFile = Replace(TotalFile, vbLf, vbCr & vbLf, 1, -1, vbBinaryCompare)
' make a 1 D array of the file to insert
Dim arrRws() As String: Let arrRws() = Split(TotalFile, vbCr & vbLf, -1, vbBinaryCompare)

Rem 3 tack on lines from file to merge
If Rws = 0 Then Let Rws = UBound(arrRws()) + 1 ' This will cause all lines to be merged if no number of lines given
Dim LnNbr As Long
For LnNbr = StRw To Rws + StRw - 1 ' This - 1 is the usual getting end row from start row and count of rows issue - its always the start row + ( Rows count - 1 )
Let arrRwsM(LnNbr - 1) = arrRws(LnNbr - StRw) & arrRwsM(LnNbr - 1) ' The - 1 here is because the one dimensional arrays start at 0, so the lines we are intersted in are 1 element back from where we might have expected them
Next LnNbr ' LnNbr - StRw takes us from 0 to 1 less than our maximumn row number - that is exactly the 0 to (1 less than our maximumn row number)
' 3b That seems to have done it, now we just need to remake the merged text file,
' Make text file, alll we need to do is make the single long string including the line breaks that
Let TotalFile = Join(arrRwsM(), vbCr & vbLf)
Rem 4 Output file
Dim FileNum2 As Long: Let FileNum2 = FreeFile(0) ' https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/freefile-function
Dim PathAndFileName2 As String
If FlNmeOut = "" Then Let FlNmeOut = Left(TxtM, InStrRev(TxtM, ".") - 1) & "Merge" & Format(Now(), "dd,mmmyyyy") & ".ps1"
Let PathAndFileName2 = ThisWorkbook.Path & "\" & FlNmeOut ' ' CHANGE TO SUIT ' Will be made if not there
Open PathAndFileName2 For Output As #FileNum2
Print #FileNum2, TotalFile ' write out entire text file
Close #FileNum2
End Function



That above coding has got me my Temp8.ps1 which is Temp7.ps1 with the merged IP hosts block function, along with a few other things done at the end of march, including a first look at a pretty coloured GUI












' Temp7BeforeIPhostsInsert https://app.box.com/s/fttlmwny6y4s5ub1q66kvqbrw2ppxdwz
https://i.postimg.cc/T2K3rjbC/hosts-Before-2022-04.jpg

' blockIPhostsRawAll250 https://app.box.com/s/7019x59uvvxt7osvb0tojr0z4g7bfdgk


https://i.postimg.cc/pV3Xk9Yx/hosts-After-2022-04.jpg
' Temp8.ps1 https://app.box.com/s/9b9li86s7dyysr7exdle30pckgp7vscz

DocAElstein
02-08-2022, 09:32 PM
In support of this post https://excelfox.com/forum/showthread.php/2408-Windows-10-and-Office-Excel/page53#post12804
A similar requirement to the last post, but for purposes of comparing a change in script by having the two versions side by side
I will do the whole thing again, just to see if I still experience similar effects on a different day.

I am interested in what seems to be a change by Chris Titus to his recent “WPF” windows utility
This change was somehow in between others, ( (ii) inbetween (i) and (iii) ), so may have slipped past most people.
I am taking my data from this red and green stuff , middle in Commit thing,
Mistery Red and Green stuff https://github.com/ChrisTitusTech/winutil/commit/a4019d74ec3fca44208eb3b621d6f8ac9bee5a64
or maybe not… This is what I have
The previous XML from god knows where and when, ( the red stuff from that last link )
Share ‘May10-17XML.txt’ https://app.box.com/s/ykynprd9a3ra4w7kcif4h5ziubwktw2t
The “new” green stuff from that last link
Share ‘May17XML.txt’ https://app.box.com/s/gsqjpfmmqwpadmu8wchjrlfrqxwrrg6e



_ (iii) This is now from the next change the next change called up XML thing


The big mystery seems to be for now where and what that red stuff comes from or is.
It seems that the full script from 10 May, the full script from just before the last change (ii) on 17May, and the stand alone XLM in change (iii) all have the same XML stuff


I think I will leave it for now… It’s all a total mess. It looks like he changed something he was never using to update it to what he was using.


….. later








Share ‘ChrisWPFTuesday10May2022.ps1’ https://app.box.com/s/end0t4spyl119iiixw9va922hdft4icx


Mistery Red and Green stuff https://github.com/ChrisTitusTech/winutil/commit/a4019d74ec3fca44208eb3b621d6f8ac9bee5a64
Share ‘ChrisWPF17May2022(ii).ps1’ https://app.box.com/s/yrzoikeg9coggyt99ofin18f2cxkf849
Share ‘May10-17XML.txt’ https://app.box.com/s/ykynprd9a3ra4w7kcif4h5ziubwktw2t
Share ‘May17XML.txt’ https://app.box.com/s/gsqjpfmmqwpadmu8wchjrlfrqxwrrg6e



The new thng thing (iii) , https://github.com/ChrisTitusTech/winutil/commit/7d4727b51be22ecfbff953357789e4d5d2923b63
https://i.postimg.cc/fR8Hhcv1/Git-Hub17-May-Update-XML.jpg
https://i.postimg.cc/90y83sxB/The-new-thing-iii.jpg
https://i.postimg.cc/vHd27HB2/The-new-thng-thing-iii.jpg
https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/MainWindow.xaml
Share ‘MainWindow_xami - StandAloneXML17May.txt’ https://app.box.com/s/lrf37fuhegad3jfgjltzlmckmw33lpj2
Share ‘MainWindow.xaml’ https://app.box.com/s/3b6v4zmgb6njamh6khyqe44zpk7cmaak

Share ‘ChrisWPF17May2022.ps1’ https://app.box.com/s/lrzeyx55hjksedzrr649snrxfmfyvtkm
Share ‘ChrisWPF17May2022(iii).ps1’ https://app.box.com/s/7u4lxbwrgubxgf37tduzx0e22s49alvf

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Another post for later use
:mad:

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Link to this post #73 #Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube/page8#Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube/page8#Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube?p=19687&viewfull=1#post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube?p=19687&viewfull=1#post19687
https://bit.ly/3Xy3ZEF https://bit.ly/3I4YEz7




February 2023...... Frankenstein YouTube Zimmer taking shape... https://postimg.cc/gallery/QFt2XdX

Temporary Bench https://i.postimg.cc/PJtH2LV4/CIMG5716.jpg ... collecting all the computers and such together
Scaffolding Bars ... Picked out and cleaned the newest / shiniest of all my Scaffolding bars ... to hang things from .... and swing around like an ape to keep fit...

Burning open fire .. in the corner of the Dungeon room … maybe I will leave it like that, messy and raw, sit there Naked with my bask to the fire and make a real gruesome look



https://i.postimg.cc/4xJsDSmv/CIMG5710.jpg
4811https://i.postimg.cc/pp1w8kQy/CIMG5710.jpg (https://postimg.cc/pp1w8kQy)https://i.postimg.cc/4xJsDSmv/CIMG5710.jpg (https://postimg.cc/pp1w8kQy)


https://i.postimg.cc/KYkVwPrr/CIMG5711.jpg
4812https://i.postimg.cc/XZWQyyPp/CIMG5711.jpg (https://postimg.cc/XZWQyyPp)

https://i.postimg.cc/yYsMxSss/CIMG5712.jpg
4813https://i.postimg.cc/K4pqsj1H/CIMG5712.jpg (https://postimg.cc/K4pqsj1H)

https://i.postimg.cc/P5q0zsC7/CIMG5713.jpg
4814https://i.postimg.cc/RNjP4YQ1/CIMG5713.jpg (https://postimg.cc/RNjP4YQ1)

4815 https://i.postimg.cc/YCyZdngC/CIMG5715.jpg
https://i.postimg.cc/YvYd9xb5/CIMG5715.jpg
(https://postimg.cc/YvYd9xb5)https://i.postimg.cc/PJtH2LV4/CIMG5716.jpg (https://postimg.cc/R6b200B6)

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Another post for later use

DocAElstein
02-08-2022, 09:32 PM
Link to this post #73 #Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube/page8#Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube/page8#Post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube?p=19687&viewfull=1#post19687
https://excelfox.com/forum/showthread.php/2840-Notes-tests-Scrapping-YouTube?p=19687&viewfull=1#post19687
https://bit.ly/3Xy3ZEF https://bit.ly/3I4YEz7




February 2023...... Frankenstein YouTube Zimmer taking shape... https://postimg.cc/gallery/QFt2XdX

Temporary Bench https://i.postimg.cc/PJtH2LV4/CIMG5716.jpg ... collecting all the computers and such together
Scaffolding Bars ... Picked out and cleaned the newest / shiniest of all my Scaffolding bars ... to hang things from .... and swing around like an ape to keep fit...

Burning open fire .. in the corner of the Dungeon room … maybe I will leave it like that, messy and raw, sit there Naked with my bask to the fire and make a real gruesome look



https://i.postimg.cc/4xJsDSmv/CIMG5710.jpg
4811https://i.postimg.cc/pp1w8kQy/CIMG5710.jpg (https://postimg.cc/pp1w8kQy)https://i.postimg.cc/4xJsDSmv/CIMG5710.jpg (https://postimg.cc/pp1w8kQy)


https://i.postimg.cc/KYkVwPrr/CIMG5711.jpg
4812https://i.postimg.cc/XZWQyyPp/CIMG5711.jpg (https://postimg.cc/XZWQyyPp)

https://i.postimg.cc/yYsMxSss/CIMG5712.jpg
4813https://i.postimg.cc/K4pqsj1H/CIMG5712.jpg (https://postimg.cc/K4pqsj1H)

https://i.postimg.cc/P5q0zsC7/CIMG5713.jpg
4814https://i.postimg.cc/RNjP4YQ1/CIMG5713.jpg (https://postimg.cc/RNjP4YQ1)

4815 https://i.postimg.cc/YCyZdngC/CIMG5715.jpg
https://i.postimg.cc/YvYd9xb5/CIMG5715.jpg
(https://postimg.cc/YvYd9xb5)https://i.postimg.cc/PJtH2LV4/CIMG5716.jpg (https://postimg.cc/R6b200B6)

DocAElstein
05-29-2023, 11:17 AM
Additional notes for this thread post ( What’s Chris up to) ) here:
https://eileenslounge.com/viewtopic.php?p=307833#p307833

curious wrote: ↑26 May 2023, 01:53
Rather than have multiple clipboard entries pasted all together, is there a way to have them on separate lines? Perhaps a macro? Thank you

Chris wrote: A great deal depends on how you define "clipboard' and "multiple clipboard entries", as well as whether your existing code loads the clipboard or not.
The macro "Curious" takes existing contents of the clipboard and parses the contents into sentences, allocating a separate paragraph ("line") to each sentence.

Additional notes for this thread post ( What’s Chris up to) here:
https://eileenslounge.com/viewtopic.php?p=307833#p307833

curious wrote: ↑26 May 2023, 01:53
Rather than have multiple clipboard entries pasted all together, is there a way to have them on separate lines? Perhaps a macro? Thank you

Chris wrote: A great deal depends on how you define "clipboard' and "multiple clipboard entries", as well as whether your existing code loads the clipboard or not.
The macro "Curious" takes existing contents of the clipboard and parses the contents into sentences, allocating a separate paragraph ("line") to each sentence.

From module modCurious in Utilities_Clipboard.doc
Option Explicit

Public Function strReplaceAll(ByVal strSource As String, strFind As String, strReplace As String) As String
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''
''' Function: strReplaceAll
'''
''' Comments: Replace characters within a string.
'''
''' Arguments: STRING String to be massaged
''' STRING Set of characters candidates for removal
''' STRING Set of characters candidates for replacement
'''
''' Returns: STRING
'''
''' Date Developer Action
''' --------------------------------------------------------------------------
''' 2008/12/20 Chris Greaves Created
'''
Dim lngI As Long
Dim lngOldI As Long
lngI = InStr(1, strSource, strFind)
While lngOldI < lngI
lngOldI = lngI
strSource = Left(strSource, lngI - 1) & strReplace & Right(strSource, Len(strSource) - lngI - Len(strFind) + 1)
lngI = InStr(lngOldI + Len(strReplace), strSource, strFind)
Wend
strReplaceAll = strSource
'Sub TESTstrReplaceAll()
' Debug.Assert "d:\\greaves\\products\\" = strReplaceAll("d:\greaves\products\", "\", "\\")
' Debug.Assert " here is a sample string " = strReplaceAll(" here is a sample string ", " ", " ")
' Debug.Assert "I:\ImagesScaled\IMG_20160923_153343233.jpg" = strReplaceAll("I:\ImagesScaled/IMG_20160923_153343233.jpg", "/", "\")
'End Sub
End Function
Sub Curious()
' Convert a set of senetences to a set of paragraphs("lines")
Dim strText As String
strText = strGetFromClipboard
strText = strReplaceAll(strText, ". ", "." & vbCrLf)
Call strClearClipboard
Call strAppendToClipboard(strText)
End Sub
Sub TESTCurious()
Call strClearClipboard
Call strAppendToClipboard("Rather than have multiple clipboard entries pasted all together. Is there a way to have them on separate lines. Perhaps a macro? Thank you. ")
Call Curious
MsgBox strGetFromClipboard
End Sub
This is what it does
Sub Curious()
strText = strGetFromClipboard
It gets any existing text from the clipboard, (in text format GetText(1) – 1 Specifies the standard Windows Unicode text format. https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.textdataformat?view=windowsde sktop-7.0 ), puts that in variable, strText _

strReplaceAll(strText, ". ", "." & vbCrLf)
It does a simple manipulation to change all and any two characters of a dot and space . __ to three characters of a single dot . and a vbCr and a vbLf.


strClearClipboard
It then clears the (windows) clipboard in a strange way: It gets what’s in the clipboard (but does nothing with it) and then puts "" in it

strAppendToClipboard(strText)
It then puts the text back in the (windows) clipboard


??? God knows what that is all about. He is demoing something, to himself I think



Sub TESTCurious()
Call strClearClipboard
Clears the (windows) clipboard in a strange way: It gets what’s in the clipboard (but does nothing with it) and then puts "" in it

Call strAppendToClipboard("Rather than have multiple clipboard entries pasted all together. Is there a way to have them on separate lines. Perhaps a macro? Thank you. ")
Puts the text
__ Rather than have multiple clipboard entries pasted all together. Is there a way to have them on separate lines. Perhaps a macro? Thank you .
in the (windows) Clipboard

Call Curious
Now we go and do the ……
Sub Curious()
strText = strGetFromClipboard
It gets any existing text from the clipboard, ( in this case _ Rather than have multiple clipboard entries pasted all together. Is there a way to have them on separate lines. Perhaps a macro? Thank you. ) , (in text format GetText(1) – 1 Specifies the standard Windows Unicode text format. https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.textdataformat?view=windowsde sktop-7.0 ), puts that in variable, strText _

strReplaceAll(strText, ". ", "." & vbCrLf)
It does a simple manipulation to change all and any two characters of a dot and space . __ to three characters of a single dot . and a vbCr and a vbLf.


strClearClipboard
It then clears the (windows) clipboard in a strange way: It gets what’s in the clipboard (but does nothing with it) and then puts "" in it

strAppendToClipboard(strText)
It then puts the text back in the (windows) clipboard

MsgBox strGetFromClipboard
It shows us that the text has been changed to
Rather than have multiple clipboard entries pasted all together.
_ Is there a way to have them on separate lines.
Perhaps a macro? Thank you.



Conclusion:
This is what is Chris is doing.
Changing this
Rather than have multiple clipboard entries pasted all together. Is there a way to have them on separate lines. Perhaps a macro? Thank you. to this
Rather than have multiple clipboard entries pasted all together.
Is there a way to have them on separate lines.
Perhaps a macro? Thank you. and doing it in a very convolute and confusing way, involving going back and forwards with the (windows) clipboard via the DataObject
I am not sure why. It’s a bit shirt tail and not quite so relevant to what I think is going on and wanted.







What the OP, curious, wanted ( https://eileenslounge.com/viewtopic.php?p=307820#p307820
https://eileenslounge.com/viewtopic.php?p=307825&sid=c946115c36f2d676d2230ac82b555fc8#p307825 )
See here a post or two down https://www.excelfox.com/forum/showthread.php/2862-Word-Tests-Useful-older-stuff-Older-versions-Chris-stuff-etc?p=20082&viewfull=1#post20082


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgxsozCmRd3RAmIPO5B4AaABAg.9fxrOrrvTln9g9wr8mv2 CS (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgxsozCmRd3RAmIPO5B4AaABAg.9fxrOrrvTln9g9wr8mv2 CS)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g96yGbAX 4t (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g96yGbAX 4t)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9g7pczEpcTz (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9g7pczEpcTz)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g7lhoX-ar5 (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=UgyT1lo2YMUyZ50bLeR4AaABAg.9fz3_oaiUeK9g7lhoX-ar5)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gD0AA-sfpl (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gD0AA-sfpl )
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gECpsAVGbh (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugx5d-LrmoMM_hsJK2N4AaABAg.9fyL20jCtOI9gECpsAVGbh)
https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg.9g9wJCunNRa9gJGhDZ4R I2 (https://www.youtube.com/watch?v=U76ZRIzBhOA&lc=Ugw6zxOMtNCfmdllKQl4AaABAg.9g9wJCunNRa9gJGhDZ4R I2)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugz-pow-E8FDG8gFZ4l4AaABAg.9f8Bng22e5d9f8hoJGZY-5 (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugz-pow-E8FDG8gFZ4l4AaABAg.9f8Bng22e5d9f8hoJGZY-5)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxev2gQt7BKZ0WYMfh4AaABAg.9f6hAjkC0ct9f8jleOui-u (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxev2gQt7BKZ0WYMfh4AaABAg.9f6hAjkC0ct9f8jleOui-u)
https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxg9iT7MPWGBWruIzR4AaABAg (https://www.youtube.com/watch?v=Sh1kZD7EVj0&lc=Ugxg9iT7MPWGBWruIzR4AaABAg)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
05-29-2023, 01:18 PM
spare post


https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vOQApTgb (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vOQApTgb)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vbihZ-7W (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vbihZ-7W)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vfmpSO0F (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vfmpSO0F)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vjfTJ7lX (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vjfTJ7lX)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vmq-LHHz (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vmq-LHHz)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vst3j_7i (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vst3j_7i)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBqjIR5 Nj (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBqjIR5 Nj)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBw8El0 r5 (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBw8El0 r5)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC63GbR uM (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC63GbR uM)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC9fyKZ do (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC9fyKZ do)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwCEn8DB Qe (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwCEn8DB Qe)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bw0Bey8g QO (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bw0Bey8g QO)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
05-29-2023, 01:19 PM
In support of this Thread https://eileenslounge.com/viewtopic.php?p=307820#p307820
https://eileenslounge.com/viewtopic.php?p=307825&sid=c946115c36f2d676d2230ac82b555fc8#p307825


What the OP, curious, wanted

This is what I think we want, and what it’s all about
I don’t think we are so much directly involved with the (Windows) clipboard
I was not sure from the first post, but then Hans reply in the second suggested that the OP, curious would have maybe had done a copy action on some words in a text in WORD, like this example
He had done three copy actions in a WORD doc like this https://i.postimg.cc/y6XSt83V/Three-Multiple-Entries.jpg
https://i.postimg.cc/pyrTnxB7/Three-Multiple-Entries.jpg (https://postimg.cc/pyrTnxB7) https://i.postimg.cc/y6XSt83V/Three-Multiple-Entries.jpg (https://postimages.org/)



Now he was probably then selecting somewhere convenient and then hitting that Paste All button ( In my German WORD Alle einfügen button), which gives him all three things in a row like this:
https://i.postimg.cc/7YHTkrSS/Paste-All.jpg https://i.postimg.cc/c6zJRj9J/Paste-All.jpg (https://postimg.cc/c6zJRj9J)
https://i.postimg.cc/7YHTkrSS/Paste-All.jpg (https://postimages.org/)


He was wanting it more like this https://i.postimg.cc/6q02vMx7/Three-Multiple-Entries-out-on-seperate-lines.jpg
https://i.postimg.cc/SYnx07sq/Three-Multiple-Entries-out-on-seperate-lines.jpg (https://postimg.cc/SYnx07sq)
https://i.postimg.cc/6q02vMx7/Three-Multiple-Entries-out-on-seperate-lines.jpg (https://postimages.org/)





Now, what is going on there initially is that we are not really directly having so much to do with the (Windows) Clipboard. (We are probably never actually loading the (Windows) Clipboard, but that is a slightly advanced and debateable issue, to do with the theme of deffered entry) . We are not really using the (Windows) Clipboard.
What we are doing is concerning ourselves with the thing sometimes referred to as the Office Clipboard, but which is actually one of a few things that monitors copy action. This Office Clipboard also makes its own copies in some form or another, as indicated in that margin on the left in the screenshot. ( In WORD 2003 and lower you get that up at the right possibly instead ) https://i.postimg.cc/hjV7SSC1/WORD-2003-and-2007-Office-Clipboard.jpg
https://i.postimg.cc/cCZtCV2y/WORD-2007-Office-Clipboard.jpg
https://i.postimg.cc/FsTkFCx8/WORD-2003-Office-Clipboard.jpg
https://i.postimg.cc/mtFg8wJy/WORD-2003-Office-Clipboard.jpg (https://postimg.cc/mtFg8wJy)https://i.postimg.cc/cg9L55dX/WORD-2007-Office-Clipboard.jpg (https://postimg.cc/cg9L55dX)


Now my proposed solution was that someone smarter than me might be able to figure out a solution from the info here:
http://www.benf.org/excel/officeclip/index.html


That is one of those older Blogs that is often very useful. But I cannot figure it out. At fist glance it seems that it is suggesting a way in VBA to do what is wanted
I think if some WORD expert could do that it would be a very useful and very interesting thing

Alan