<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>http://tcamp23.synology.me:8899/index.php?action=history&amp;feed=atom&amp;title=Vba_AI_access</id>
	<title>Vba AI access - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="http://tcamp23.synology.me:8899/index.php?action=history&amp;feed=atom&amp;title=Vba_AI_access"/>
	<link rel="alternate" type="text/html" href="http://tcamp23.synology.me:8899/index.php?title=Vba_AI_access&amp;action=history"/>
	<updated>2026-10-12T07:27:14Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://tcamp23.synology.me:8899/index.php?title=Vba_AI_access&amp;diff=1096&amp;oldid=prev</id>
		<title>TimChoi: /* 크롬 사용 */</title>
		<link rel="alternate" type="text/html" href="http://tcamp23.synology.me:8899/index.php?title=Vba_AI_access&amp;diff=1096&amp;oldid=prev"/>
		<updated>2026-10-01T07:17:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;크롬 사용&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026년 10월 1일 (목) 07:17 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l125&quot;&gt;125번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;125번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[분류: 플그램]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[분류: AI]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TimChoi</name></author>
	</entry>
	<entry>
		<id>http://tcamp23.synology.me:8899/index.php?title=Vba_AI_access&amp;diff=703&amp;oldid=prev</id>
		<title>172.18.0.1: 새 문서: AI access를 엑셀에서 접근하려고 할 때   =VBA사용=  =크롬 사용=  selenium 활용       Dim options As New ChromeOptions &#039;객체 인식 오류 나는 코드  &lt;code&gt; Sub OpenChromeWithProfile()     Dim driver As New ChromeDriver     Dim options As New ChromeOptions     Dim profilePath As String          &#039; 사용하려는 Chrome 프로필 경로 설정     &#039; 일반적인 프로필 경로 예시 (사용자 환경에 맞게 수정 필요)     profilePath = &quot;C:\Users\...</title>
		<link rel="alternate" type="text/html" href="http://tcamp23.synology.me:8899/index.php?title=Vba_AI_access&amp;diff=703&amp;oldid=prev"/>
		<updated>2025-03-20T08:17:48Z</updated>

		<summary type="html">&lt;p&gt;새 문서: AI access를 엑셀에서 접근하려고 할 때   =VBA사용=  =크롬 사용=  selenium 활용       Dim options As New ChromeOptions &amp;#039;객체 인식 오류 나는 코드  &amp;lt;code&amp;gt; Sub OpenChromeWithProfile()     Dim driver As New ChromeDriver     Dim options As New ChromeOptions     Dim profilePath As String          &amp;#039; 사용하려는 Chrome 프로필 경로 설정     &amp;#039; 일반적인 프로필 경로 예시 (사용자 환경에 맞게 수정 필요)     profilePath = &amp;quot;C:\Users\...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;AI access를 엑셀에서 접근하려고 할 때&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=VBA사용=&lt;br /&gt;
&lt;br /&gt;
=크롬 사용=&lt;br /&gt;
&lt;br /&gt;
selenium 활용&lt;br /&gt;
&lt;br /&gt;
     Dim options As New ChromeOptions &amp;#039;객체 인식 오류 나는 코드&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Sub OpenChromeWithProfile()&lt;br /&gt;
    Dim driver As New ChromeDriver&lt;br /&gt;
    Dim options As New ChromeOptions&lt;br /&gt;
    Dim profilePath As String&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 사용하려는 Chrome 프로필 경로 설정&lt;br /&gt;
    &amp;#039; 일반적인 프로필 경로 예시 (사용자 환경에 맞게 수정 필요)&lt;br /&gt;
    profilePath = &amp;quot;C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data\Profile 1&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; Chrome 옵션 설정&lt;br /&gt;
    options.AddArgument &amp;quot;--user-data-dir=&amp;quot; &amp;amp; profilePath&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 추가 옵션 (필요시 주석 해제하여 사용)&lt;br /&gt;
    &amp;#039;options.AddArgument &amp;quot;--start-maximized&amp;quot;  &amp;#039; 창 최대화&lt;br /&gt;
    &amp;#039;options.AddArgument &amp;quot;--disable-extensions&amp;quot;  &amp;#039; 확장 프로그램 비활성화&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 설정된 옵션으로 Chrome 시작&lt;br /&gt;
    driver.Start &amp;quot;chrome&amp;quot;, options&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 웹사이트 열기 (예: Google)&lt;br /&gt;
    driver.Get &amp;quot;https://www.google.com&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 여기에 필요한 추가 작업 코드 작성&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 브라우저 유지 (즉시 종료하지 않음)&lt;br /&gt;
    &amp;#039; 나중에 브라우저를 닫으려면 driver.Quit 사용&lt;br /&gt;
    &amp;#039; driver.Quit&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Function GetChromeProfiles() As Collection&lt;br /&gt;
    &amp;#039; Chrome 프로필 목록 가져오기&lt;br /&gt;
    Dim profiles As New Collection&lt;br /&gt;
    Dim userDataDir As String&lt;br /&gt;
    Dim fso As Object&lt;br /&gt;
    Dim folder As Object&lt;br /&gt;
    Dim subFolder As Object&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; FileSystemObject 생성&lt;br /&gt;
    Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; Chrome 사용자 데이터 디렉토리 경로 (일반적인 위치)&lt;br /&gt;
    userDataDir = Environ(&amp;quot;LOCALAPPDATA&amp;quot;) &amp;amp; &amp;quot;\Google\Chrome\User Data&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 디렉토리 존재 확인&lt;br /&gt;
    If fso.FolderExists(userDataDir) Then&lt;br /&gt;
        Set folder = fso.GetFolder(userDataDir)&lt;br /&gt;
        &lt;br /&gt;
        &amp;#039; Default 프로필 추가&lt;br /&gt;
        profiles.Add userDataDir &amp;amp; &amp;quot;\Default&amp;quot;, &amp;quot;Default&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        &amp;#039; 추가 프로필 폴더 탐색&lt;br /&gt;
        For Each subFolder In folder.SubFolders&lt;br /&gt;
            If InStr(subFolder.Name, &amp;quot;Profile&amp;quot;) &amp;gt; 0 Then&lt;br /&gt;
                profiles.Add userDataDir &amp;amp; &amp;quot;\&amp;quot; &amp;amp; subFolder.Name, subFolder.Name&lt;br /&gt;
            End If&lt;br /&gt;
        Next subFolder&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    Set GetChromeProfiles = profiles&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
Sub SelectProfileAndLaunchChrome()&lt;br /&gt;
    &amp;#039; 프로필 선택하고 Chrome 실행하기&lt;br /&gt;
    Dim profiles As Collection&lt;br /&gt;
    Dim profile As Variant&lt;br /&gt;
    Dim selectedProfile As String&lt;br /&gt;
    Dim profileNames() As String&lt;br /&gt;
    Dim i As Integer&lt;br /&gt;
    Dim selectedIndex As Integer&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 프로필 목록 가져오기&lt;br /&gt;
    Set profiles = GetChromeProfiles()&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 프로필이 없으면 종료&lt;br /&gt;
    If profiles.Count = 0 Then&lt;br /&gt;
        MsgBox &amp;quot;Chrome 프로필을 찾을 수 없습니다.&amp;quot;, vbExclamation&lt;br /&gt;
        Exit Sub&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 프로필 이름 배열 만들기&lt;br /&gt;
    ReDim profileNames(1 To profiles.Count)&lt;br /&gt;
    i = 1&lt;br /&gt;
    For Each profile In profiles&lt;br /&gt;
        profileNames(i) = profiles(i)&lt;br /&gt;
        i = i + 1&lt;br /&gt;
    Next profile&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 사용자에게 프로필 선택 요청&lt;br /&gt;
    selectedIndex = Application.InputBox(&amp;quot;사용할 Chrome 프로필 번호를 선택하세요 (1-&amp;quot; &amp;amp; profiles.Count &amp;amp; &amp;quot;):&amp;quot; &amp;amp; vbNewLine &amp;amp; _&lt;br /&gt;
                                       Join(profileNames, vbNewLine), Type:=1)&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 취소 확인&lt;br /&gt;
    If selectedIndex &amp;lt; 1 Or selectedIndex &amp;gt; profiles.Count Then&lt;br /&gt;
        MsgBox &amp;quot;유효한 프로필을 선택하지 않았습니다.&amp;quot;, vbExclamation&lt;br /&gt;
        Exit Sub&lt;br /&gt;
    End If&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 선택된 프로필로 Chrome 실행&lt;br /&gt;
    selectedProfile = profiles(selectedIndex)&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; Chrome 드라이버 생성 및 실행&lt;br /&gt;
    Dim driver As New ChromeDriver&lt;br /&gt;
    Dim options As New ChromeOptions&lt;br /&gt;
    &lt;br /&gt;
    options.AddArgument &amp;quot;--user-data-dir=&amp;quot; &amp;amp; selectedProfile&lt;br /&gt;
    driver.Start &amp;quot;chrome&amp;quot;, options&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039; 테스트용 URL 열기&lt;br /&gt;
    driver.Get &amp;quot;https://www.google.com&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    MsgBox &amp;quot;Chrome이 &amp;quot; &amp;amp; profileNames(selectedIndex) &amp;amp; &amp;quot; 프로필로 실행되었습니다.&amp;quot;, vbInformation&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>172.18.0.1</name></author>
	</entry>
</feed>