When vbCr and when vbCrLf? 
Author Message
 When vbCr and when vbCrLf?

Relative paths are useful mostly when using hyperlinks.
The  relative path has to be understood by the native file system to make
this work usefully.

Oh well, OS X will allow the Mac to catch up and use, if they so choose,
relative paths.

Office XP  will have available a "common runtime library.

Both technologies are 30+ years old.
It's about time Windows and Macs implemented this stuff.

--
Please post your response to the newsgroup.

http://www.*-*-*.com/ ; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------

Quote:


> > Hi Paul,

> > Relative paths indicate a path relative to the location of the active
> > document.

> > ..\..\directoryname\filename.doc indicates two folders up from the
folder
> > holding the active document then down into the directoryname folder to
find
> > the document filename.doc.
> > ..\ means one directory level up (the parent directory or folder)
> > .\ means the current directory or folder (but doesn't seem to be needed
for
> > relative paths within Word).

> Actually, now that I think about it, there is something very analogous in
> AppleScript:

>     alias ":"

> gets you the container (i.e. the directory of) the current application. So
> if an applescript is running as a self-standing "applet", that gets you
its
> folder. If the script is running in Microsoft Entourage, say, that gets
you
> Entourage's folder.

>     alias "::"

> gets you that folder's folder.

> So

>     alias ((alias "::" as string) & "directoryname:filename.doc")

> will get you two folders up from the folder holding the active application
> (say, Word) then down into the directoryname folder to find the document
> filename.doc.

> To get this sort of relation for a document, rather than an application,
> from a VB Macro embedded in a Word doc, would be trickier, but could be
> done. You'd start out with the FullName, or, better, Path property of the
> document, then do a MacScript function to get the related filepath of
> another document in a related folder. But you couldn't use the shortcuts
> above: there's another way in AppleScript to "go back" towards the root
then
> add the colons and intervening directories and other file name.

> --
> Paul Berkowitz



Sun, 07 Sep 2003 07:59:37 GMT  
 When vbCr and when vbCrLf?
I was perusing some examples in the Code Librarian that is part of Office
2000 Developer's Edition. I noticed that the examples use vbCRLF instead of
vbCR.

--
Please post your response to the newsgroup.

http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------

Quote:
> I've been trying to find somewhere in the VB Help that might explain when
to
> use vbCr and when to use vbCrLf in Code, but can't find anywhere in either
> the Core VBA Help or the Word VBA Help that explains it.

> Coming from the Macintosh (which uses only the carriage return equivalent
to
> vbCr or Chr(13) in all cases), I rather expected that it would all be
vbCrLf
> all the time. But I've found that in fact vbCr is what's expected in
literal
> strings in Code most (?) of the time.

> Is there any simple rule of thumb, or somewhere detailing any more
> complicated  rules?

> --
> Paul Berkowitz



Wed, 10 Sep 2003 02:43:04 GMT  
 When vbCr and when vbCrLf?
Hi

In a Word doc, a paragraph mark is vbCR.  If however you open a text
file (*.txt) into Word the lines are often terminated with vbCRLF and
sometimes with vbLF - this is the main use I've found for using one of
these instead of vbCR.  There is also vbNewLine which is
platform-specific.  This is in the Word97 VBA Help topic
"Miscellaneous Constants"

HTH

On Sat, 17 Mar 2001 08:28:06 -0800, Paul Berkowitz

Quote:

>I've been trying to find somewhere in the VB Help that might explain when to
>use vbCr and when to use vbCrLf in Code, but can't find anywhere in either
>the Core VBA Help or the Word VBA Help that explains it.

>Coming from the Macintosh (which uses only the carriage return equivalent to
>vbCr or Chr(13) in all cases), I rather expected that it would all be vbCrLf
>all the time. But I've found that in fact vbCr is what's expected in literal
>strings in Code most (?) of the time.

>Is there any simple rule of thumb, or somewhere detailing any more
>complicated  rules?

>--
>Paul Berkowitz

Regards

Murdoch Brown
Recall Data Services Ltd, UK
This message does not necessarily represent the
views of Recall Data Services Ltd



Mon, 22 Sep 2003 20:16:13 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 
 

 
Powered by phpBB® Forum Software