0

I am going to take screenshot of Fallowing Webpage

https://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?symbolCode=-9999&symbol=BANKNIFTY&symbol=BANKNIFTY&instrument=-&date=-&segmentLink=17&symbolCount=2&segmentLink=17

But screenshot showing only visible window

is there any way to take a full webpage screenshot

My Codes:

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

Private Const VK_SNAPSHOT As Byte = 44

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Private Const SW_SHOWMAXIMIZED = 3
Private Const VK_LCONTROL As Long = &HA2
Private Const VK_V = &H56
Private Const KEYEVENTF_KEYUP = &H2

Sub Test() 
    MP = ActiveWorkbook.Name
    Dim IE As New SHDocVw.InternetExplorer

    IE.Visible = True
    IE.navigate "https://www.nseindia.com/live_market/dynaContent/live_watch/option_chain/optionKeys.jsp?symbolCode=-9999&symbol=BANKNIFTY&symbol=BANKNIFTY&instrument=-&date=-&segmentLink=17&symbolCount=2&segmentLink=17"
    ShowWindow IE.hwnd, SW_SHOWMAXIMIZED

    Do While IE.readyState <> READYSTATE_COMPLETE
    Loop

    Call keybd_event(VK_SNAPSHOT, 0, 0, 0)

    Windows(MP).Activate
    Range("A1").Select
    ActiveSheet.Paste
End Sub

I need full Screenshot like attached Picture:

enter image description here

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Ashish
  • 83
  • 5
  • You would either need to scroll down and make another (or more) screenshot(s) until the end of the web page and in the end overlap all the images at the correct position to fiddle them together to one big screenshot image. • Or find a third party tool that can exactly do what you want and that you can automate by VBA or command line. • First is to broad to be answered here, and second is off-topic. – Pᴇʜ Jul 17 '19 at 08:05
  • You could use selenium and take advantage of chrome and firefox settings: https://www.deconetwork.com/blog/how-to-take-full-webpage-screenshots-instantly/ – QHarr Jul 17 '19 at 13:21
  • You could also try vba command line if FF installed: https://stackoverflow.com/questions/13158083/take-a-full-page-screenshot-with-firefox-on-the-command-line or switch languages and try something like: https://stackoverflow.com/questions/41721734/take-screenshot-of-full-page-with-selenium-python-with-chromedriver btw putting @User doesn't notify the user unless they are already part of the thread. – QHarr Jul 17 '19 at 13:23

0 Answers0