Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Word / March 2006



Tip: Looking for answers? Try searching our database.

Modifying part of pc-macro to mac?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
koester.daniel@gmail.com - 09 Mar 2006 15:23 GMT
Hi everyone!
(I hope that this is the right group for this, please let me know if
you know of any group who specialises in macros for mac)

I need some help with a relatively easy macro for word for mac. I have
a macro that I have written for pc but I cant find any relevant help in
the macro enviroment in the mac version so I dont know how to convert
it. The part of the macro that I need help with is the following. I
need to be able to open a folder and select some of the files and the
add there filenames to an array. Its realy simple on the pc, this is
what I have there:

Dim dlgopen As FileDialog
   Set dlgopen = Application.FileDialog( _
       FileDialogType:=msoFileDialogOpen)
   With dlgopen
       .AllowMultiSelect = True
       .Filters.Clear
       .Filters.Add "RTF files", "*.rtf"
       .Show
   End With
   If dlgopen.SelectedItems.Count = 0 Then

   MsgBox "You have not selected any files!"
   Exit Sub
   End If

   i = 0
While dlgopen.SelectedItems.Count > i
   ReDim Preserve mylist(i + 1)
   mylist(i) = dlgopen.SelectedItems.Item(i + 1)
   i = i + 1
Wend

Its the dialog part that I am having problems with. So if there is
anyone out there who can help me, please please please!

Best regards
Daniel
John McGhie [MVP - Word and Word Macintosh] - 10 Mar 2006 07:06 GMT
Hi Daniel:

Eeeewwww....  I think that one may be too hard...  You would have to rewrite
that one for, since the msoFileDialogOpen doesn't exist in Mac Word.

You will need to use  wdDialogFileFind or wdDialogFileOpen.

See the Help topic "Built-in dialog box argument lists" (which will appear
only if you are in the Visual Basic Editor).

I don't have time to do this for you now: get back to us if you need further
help.

Cheers

On 10/3/06 2:23 AM, in article
1141917835.740619.168980@v46g2000cwv.googlegroups.com,

> Hi everyone!
> (I hope that this is the right group for this, please let me know if
[quoted text clipped - 35 lines]
> Best regards
> Daniel

Signature

Please reply to the newsgroup to maintain the thread.  Please do not email
me unless I ask you to.

John McGhie <john@mcghie.name>
Microsoft MVP, Word and Word for Macintosh.  Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.