Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created November 16, 2015 05:42
Show Gist options
  • Save kumatti1/1765f3917a9a27fb6360 to your computer and use it in GitHub Desktop.
Save kumatti1/1765f3917a9a27fb6360 to your computer and use it in GitHub Desktop.
個別ページのaセレクタ変更
Sub hoge()
Const url = "https://twitter.com/ユーザー名
Dim IE
Set IE = CreateObject("Shell.Application").Windows.findwindowSW(url, Empty, 1, 0, 1)
If IE Is Nothing Then Exit Sub
Dim e As IHTMLStyleSheetsCollection
Set e = IE.Document.styleSheets
Dim st As IHTMLStyleSheet
Set st = e.Item(3)
Dim r As DispHTMLStyleSheetRule
Set r = st.rules.Item(0)
'MsgBox r.selectorText
'MsgBox r.Style.cssText
r.Style.cssText = "color: rgb(255, 255, 255);"
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment