Solved

Word Basic FileSaveAs ignores formatting

Posted on 1997-06-19
11
1,002 Views
Last Modified: 2006-11-17
I am using Word 6.0a for Windows under Windows 3.1

I have a macro which is trying to save a file in text format with line breaks.

I have included the statement:

FileSaveAs .Name = newfilename$, .Format = 3

but no matter how I try, the .Format clause is ignored, and the document is saved as a word document.

This happens whatever value I use in the clause.
0
Comment
Question by:za9ra50
11 Comments
 
LVL 1

Expert Comment

by:DarkAge
ID: 1602891
Okay, Try this (us the full options statment):
FileSaveAs .Name = "Doc1.txt", .Format = 3, .LockAnnot = 0, .Password = "", .AddToMru = 1, .WritePassword = "", .RecommendReadOnly = 0, .EmbedFonts = 0, .NativePictureFormat = 0, .FormsData = 0, .SaveAsAOCELetter = 0
0
 

Author Comment

by:za9ra50
ID: 1602892
Tried your suggestion, didn't seem to make any difference.

By the way,

.SaveAsAOCELetter = 0

isn't a valid component of the dialog, so I replaced it with the only element missing, .FormsData = 0

Full marks for speed of response though !
0
 
LVL 1

Expert Comment

by:DarkAge
ID: 1602893
1) If this answer is not good for u u should reject it.
2) I have another option, just reject this one.
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

Expert Comment

by:DEREKCHASS
ID: 1602894
It seems to work OK with Word6 under Win 95. Try this - and check the filename you give can be written to. (DiskSpace, read/write, permissions etc)

Sub MAIN
N$ = InputBox$("Name")
FileSaveAs .Name = N$, .Format = 2
End Sub

0
 

Author Comment

by:za9ra50
ID: 1602895
Thank you for letting me know that it works under Windows 95.

File name, space and permissions are all OK, as the document is saved, with the specified name, but in Word document format.

Does anyone have any sugestions relevant to Windows 3.1 ?

Can anyone replicate the problem ?
0
 

Author Comment

by:za9ra50
ID: 1602896
Seems like a toughie.
0
 

Expert Comment

by:blovett
ID: 1602897
Why are you trying to make a macro to save this file as a text documnt?  Why don't you just go do this:

File | Save As

and save the file as a MS-DOS Text with Line Breaks?
0
 

Author Comment

by:za9ra50
ID: 1602898
I have a requirement to submit a monthly report of my team's work.

This is built up from last month's report plus input from various members of the team.

Word is an excellent tool to compose the report, but I wish to distribute it via Email. The Email client I use is Pegasus mail for windows, which is also an excellent (if somewhat basic) tool to do its job. However, it imports text most effectively when it has been saved as text with line breaks.

The macro does all sorts of processing, including moving last month's outlooks to this month's highlights, renaming the file, changing the title to refelct the reporting period, changing Word's bulleted lists to somthing that will look OK in Pegasus, and finally saving it in a format that Pegasus can import.

I could do it all manually (in fact I'm having to at the moment) but hey, ain't macros there to make life easier ?
0
 

Author Comment

by:za9ra50
ID: 1602899
P.S. I would have rated your answer, but when I try, I get

File Not found

The requested URL /topics/bin/ChooseAnswer was not found on this server.
0
 
LVL 1

Accepted Solution

by:
DarkAge earned 200 total points
ID: 1602900
Dear friend, I found the answer, it a BUG!!!
I have called: I have called to MS suport and ask the quastion, this is a bug and you have no way round it.
I know it a shame but live with it.
P.S: Took me 2 hours to reach head of support center in microsoft so i hope y'r rating will be good.
THanx.

0
 

Author Comment

by:za9ra50
ID: 1602901
Not the answer I was hoping for, but anyone who can get to speak to anyone at Microsoft, never mind the Head of technical support, deserves a top rating.

It's nice to know I wasn't going mad....
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Some AHK commands fail in Microsoft OneNote 5 48
how to re-acticvate Office 2010 6 41
How do i remove text in between commas in Excel? 14 48
Outlook 2013 License Question 8 28
Have you ever had the experience that you had to follow 10 steps over and over again every time when you need to nicely forward an important email to your manager? Fear no more! With the help of the Quick Steps feature in Outlook 2010, your old chor…
This article will show you how to use shortcut menus in the Access run-time environment.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question