Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Take a Screenshot of an HTML File with VBA

Access VBA can display an HTML file in EdgeBrowserControl, but saving a screenshot requires WebView2 capture through a host or an OS-level workaround.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: Access’s EdgeBrowserControl can display an HTML file, but its documented VBA-facing methods do not include a screenshot function. To save an image from the embedded page, you need a host or interop layer that exposes WebView2’s CapturePreview API. A VBA-only screen-capture workaround is possible in principle, but it captures a visible window rather than providing a documented screenshot method for the Access control.

What Access VBA can—and cannot—do

Microsoft describes Access’s EdgeBrowserControl as an Edge WebView2-based browser control for an Access form. Its reference includes navigation events such as DocumentComplete and methods such as ExecuteJavascript, but does not document a method to save the displayed page as an image. See the Access EdgeBrowserControl reference.

As an Amazon Associate I earn from qualifying purchases.

WebView2 itself has an image capture API: CoreWebView2.CapturePreview captures what the WebView is displaying to an image stream. That is a WebView2 host API, not a documented direct call on Access’s VBA control. The WebView2 API reference describes the capture operation; the WebView2 features and APIs overview explains the broader host/API model.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Display a local HTML file in an Access form

  1. In Access, open the form in Design View and add an EdgeBrowserControl.

    #1 Best Overall
    Sale
    Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner | For Computers including PC and Mac Receipt and Document Scanner USB Powered
    • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
    • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
    • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
    • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
    • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0
  2. Set its ControlSource to the local HTML file path or URL you want to display.

  3. Use the control’s DocumentComplete event as a navigation-completion signal before running code that depends on the loaded document. It does not, by itself, prove that delayed images, fonts, animations, or other asynchronous content have finished rendering.

    Rank #2
    Sale
    Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
    • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
    • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
    • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
    • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
    • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

This gets the page into the Access form; it does not create a screenshot. For a capture, the component hosting WebView2 must expose the relevant WebView2 API and provide a way to save its image stream.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use WebView2 CapturePreview through a host or interop layer

WebView2’s capture operation is asynchronous and writes the rendered view to a stream. The WebView2 documentation says not to call it before the ContentLoading event for the current navigation. An early call can fail; on a later navigation it can capture the page you navigated away from rather than the new page. Wait for the event associated with the navigation you intend to capture, then invoke the API through a host that exposes it.

Rank #3
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner | For Computers including PC and Mac with Auto Document Feeder and Image Adjustment Tools
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning

The cited Microsoft references do not provide an end-to-end Access VBA example that connects an Access EdgeBrowserControl to CapturePreview and saves the result. Do not treat the API name as a VBA method you can call directly on the Access control. If you require that route, choose or build a WebView2 host/interop layer that exposes the capture method, its completion callback, and stream-to-file handling; verify compatibility with your installed Office/Access control and WebView2 Runtime.

Choose capture scope and timing deliberately

  • Viewport versus full page: CapturePreview captures what the WebView is displaying. Do not assume it produces a full-page image of content outside the visible view.
  • Rendering readiness: navigation completion and visual readiness are different. If the HTML loads assets or changes its layout after navigation, wait for the page-specific condition your application needs before capturing.
  • Renderer compatibility: the result depends on the browser renderer hosting the file and whether it supports the HTML, CSS, and JavaScript in use.
  • Output handling: the WebView2 API provides image data through a stream; the host still has to consume and save that stream in the desired format.

VBA-only workaround: capture a visible browser window

If you must stay with VBA and cannot add a host that exposes WebView2 capture, a separate browser window plus an operating-system screen-capture mechanism is a workaround—not an Access EdgeBrowserControl screenshot API. It can capture only what is visible in the chosen window and may include window borders or other chrome. Content outside the viewport will be missing unless you scroll and capture it separately. The cited Microsoft documentation does not establish a turnkey VBA implementation for this workaround, so the exact code depends on the screen-capture mechanism you choose.

Rank #4
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Troubleshoot common capture failures

  • No screenshot method appears on the Access control: that is consistent with its documented method list. Use a host or interop layer exposing WebView2 capture, or use a visible-window workaround.
  • Capture fails immediately after navigation: wait for ContentLoading for that navigation before calling CapturePreview.
  • The image shows the previous page: a capture may have run before the new navigation reached ContentLoading. Associate the event and capture with the current navigation.
  • Images, fonts, or scripts are missing or unsettled: navigation completion may precede delayed asset loading or later page updates. Wait for a condition relevant to the page, then capture.
  • The screenshot is cropped: a displayed-view capture or screen grab does not necessarily include off-screen page content. Scroll and capture sections, or use a host with an explicitly suitable full-page capture capability.
  • The control or API is unavailable: check the installed Access/Office version, the EdgeBrowserControl availability, WebView2 Runtime, and whether your chosen host actually exposes the needed capture API.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you only need a screenshot of a URL or hosted HTML page, ScreenshotNeo can return an image or PDF from one GET request. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. It also has an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Python’s requests package, set your API key, and run this example (replace the target URL as needed):

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)

See the ScreenshotNeo API documentation for request options and response details. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Best Value
Sale
ScanSnap iX2500 Wireless or USB High-Speed Document Scanner, Black | Cloud Enabled | Photos & Receipts | Large Touchscreen | 100 page Auto Document Feeder | Mac or PC
  • OUR MOST ADVANCED SCANSNAP. Large touchscreen, fast 45ppm double-sided scanning, 100-sheet document feeder, Wi-Fi and USB connectivity, automatic optimizations, and support for cloud services. Upgraded replacement for the discontinued iX1600
  • CUSTOMIZABLE. SHARABLE. Select personalized profiles from the touchscreen. Send to PC, Mac, mobile devices, and clouds. QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • STABLE WIRELESS OR USB CONNECTION. Built-in Wi-Fi 6 for the fastest and most secure scanning. Connect to smart devices or cloud services without a computer. USB-C connection also available
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. Easily manage, edit, and use scanned data from documents, receipts, photos, and business cards. Automatically optimize, name, and sort files
  • AVOIDS PAPER JAMS AND DAMAGE. Features a brake roller system to feed paper smoothly, a multi-feed sensor that detects pages stuck together, and skew detection to prevent paper damage and data loss

Frequently Asked Questions

Can Access VBA call CapturePreview directly on EdgeBrowserControl?

The documented Access EdgeBrowserControl methods do not include CapturePreview. That API belongs to WebView2 and requires a host or interop layer that exposes it.

Does CapturePreview save a full-page screenshot?

The cited WebView2 reference describes capturing what the WebView is displaying; it does not establish full-page capture of content beyond the visible view.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.