Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 02-23-2023, 05:11 PM
syl3786 syl3786 is offline How to export hyperlinks from Excel to Word? Windows 10 How to export hyperlinks from Excel to Word? Office 2019
Advanced Beginner
How to export hyperlinks from Excel to Word?
 
Join Date: Jan 2023
Posts: 97
syl3786 is on a distinguished road
Default

Quote:
Originally Posted by syl3786 View Post
Thank you so much for your help! You are genius! I ran it but the system informed "BrowseForFile" has not defined. Then I added a function for the "BrowseForFile". It successfully add the hyperlinks to the texts.

[/CODE]

Private Function BrowseForFile(Optional strTitle As String, Optional bExcel As Boolean) As String
Dim fDialog As FileDialog
On Error GoTo err_Handler
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
.Title = strTitle
.AllowMultiSelect = False
.Filters.Clear
If bExcel Then
.Filters.Add "Excel workbooks", "*.xls,*.xlsx,*.xlsm"
Else
.Filters.Add "Word documents", "*.doc,*.docx,*.docm"
End If
.InitialView = msoFileDialogViewList
If .Show <> -1 Then GoTo err_Handler:
BrowseForFile = fDialog.SelectedItems.Item(1)
End With
lbl_Exit:
Exit Function
err_Handler:
BrowseForFile = vbNullString
Resume lbl_Exit
End Function

[/CODE]

I put "On Error Resume Next" before the "Dim Arr() As Variant". Then Error 94 doesn't pop out.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Word Data to Excel anifa Word 2 12-11-2022 02:51 PM
How to export hyperlinks from Excel to Word? Word form with the intent of Excel export Flyckten Word VBA 5 09-03-2018 05:34 AM
How to export hyperlinks from Excel to Word? VBA Export Data as Text from Excel to Word lwbarnes Word VBA 3 06-09-2016 02:47 PM
Through VBA, export range from Excel to Word duugg Word VBA 0 08-24-2009 07:50 PM
Word to Excel hyperlinks and spaces gak Word 1 09-14-2008 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft